Changeset 218 for trunk/lib/Cache.inc.php
- Timestamp:
- Dec 17, 2006 10:27:56 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Cache.inc.php
r201 r218 186 186 } 187 187 188 if ( isset($_SESSION['_cache'][$this->_ns][$key])) {188 if (array_key_exists($key, $_SESSION['_cache'][$this->_ns])) { 189 189 $app->logMsg(sprintf('Retreiving %s from cache.', $key), LOG_DEBUG, __FILE__, __LINE__); 190 190 // Move the accessed cached datum to the top of the stack. Maybe somebody knows a better way to do this? … … 204 204 * 205 205 * @param string $key The key of the object to check. 206 * @return bool The return from isset().206 * @return bool True if a value exists for the given key. 207 207 */ 208 208 function exists($key) … … 219 219 * 220 220 * @param string $key The key of the object to check. 221 * @return bool The return from isset().221 * @return bool True if the value existed before being unset. 222 222 */ 223 223 function delete($key) 224 224 { 225 unset($_SESSION['_cache'][$this->_ns][$key]); 225 if (array_key_exists($key, $_SESSION['_cache'][$this->_ns])) { 226 unset($_SESSION['_cache'][$this->_ns][$key]); 227 return true; 228 } else { 229 return false; 230 } 226 231 } 227 232
Note: See TracChangeset
for help on using the changeset viewer.