diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-26 09:33:49 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-26 09:33:49 +0000 |
commit | 8846d32f266e9b9e3955878a214bd096c005bf23 (patch) | |
tree | f4c119d94d228e68b980d0ae1dd3b7bc627f0008 | |
parent | 39d776faa951a40eab75d035aa728fecd2803b58 (diff) | |
download | brdo-8846d32f266e9b9e3955878a214bd096c005bf23.tar.gz brdo-8846d32f266e9b9e3955878a214bd096c005bf23.tar.bz2 |
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)
-rw-r--r-- | includes/cache.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/cache.inc b/includes/cache.inc index c993a521c..524ab1d41 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. |