diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-01-05 16:28:34 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-01-05 16:28:34 +0000 |
commit | 58152c45d119160f4523e4de408a9a9166011cae (patch) | |
tree | aeea930fd459c3ce2e2d040006d51876336f3181 /update.php | |
parent | f9abcda22f476adafdad02e9e08d9f2e5e95ef93 (diff) | |
download | brdo-58152c45d119160f4523e4de408a9a9166011cae.tar.gz brdo-58152c45d119160f4523e4de408a9a9166011cae.tar.bz2 |
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.
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 11 |
1 files changed, 10 insertions, 1 deletions
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)) ." "; |