From 8846d32f266e9b9e3955878a214bd096c005bf23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sun, 26 Aug 2007 09:33:49 +0000 Subject: [PATCH] noted by Robert Douglass in his caching presentation: the key param to cache_get should be renamed to cid for consistency (all other functions have cid) --- includes/cache.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/cache.inc b/includes/cache.inc index c993a521c47..524ab1d419f 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -5,13 +5,13 @@ * Return data from the persistent cache. Data may be stored as either plain text or as serialized data. * cache_get will automatically return unserialized objects and arrays. * - * @param $key + * @param $cid * The cache ID of the data to retrieve. * @param $table * The table $table to store the data in. Valid core values are 'cache_filter', * 'cache_menu', 'cache_page', or 'cache' for the default cache. */ -function cache_get($key, $table = 'cache') { +function cache_get($cid, $table = 'cache') { global $user; // Garbage collection necessary when enforcing a minimum cache lifetime @@ -22,7 +22,7 @@ function cache_get($key, $table = 'cache') { variable_set('cache_flush', 0); } - $cache = db_fetch_object(db_query("SELECT data, created, headers, expire, serialized FROM {". $table ."} WHERE cid = '%s'", $key)); + $cache = db_fetch_object(db_query("SELECT data, created, headers, expire, serialized FROM {". $table ."} WHERE cid = '%s'", $cid)); if (isset($cache->data)) { // If the data is permanent or we're not enforcing a minimum cache lifetime // always return the cached data.