From 58152c45d119160f4523e4de408a9a9166011cae Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 5 Jan 2002 16:28:34 +0000 Subject: Integrated Marco's generic/improved cache into Drupal. Requires an SQL update. See below for more details. - Merged the file "cache.inc" into "common.inc". - In addition, I renamed the field 'url' in the cache table to a more generic 'cid' (cache identifier). It's no longer for URLs only. - Made the "cache_set()" function ASNI compliant such that it will play nice with other databases such as Postgres. - Added some extra input checking. - Updated the old caching code in the functions "page_header()" and "page_footer()" to use the new, generic cache API. - Updated "update.php" to make the required SQL changes. --- update.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'update.php') diff --git a/update.php b/update.php index f26937533..b86627427 100644 --- a/update.php +++ b/update.php @@ -42,6 +42,7 @@ $mysql_updates = array( "2001-12-24" => "update_15", "2001-12-30" => "update_16", "2001-12-31" => "update_17", + "2002-01-05" => "update_18", ); // Update functions @@ -306,7 +307,15 @@ function update_17() { );"); } -// System functions +function update_18() { + update_sql("ALTER TABLE cache CHANGE timestamp expire int(11) DEFAULT '0' NOT NULL;"); + update_sql("ALTER TABLE cache CHANGE url cid varchar(255) DEFAULT '' NOT NULL;"); +} + +/* +** System functions +*/ + function update_sql($sql) { global $edit; print nl2br(check_output($sql)) ." "; -- cgit v1.2.3