示例#1
0
 /**
  * Deletes all invalid entries from the cache.
  * Does this only once per run, so all calls after
  * the first one will be skipped.
  *
  * @return bool
  * @static
  */
 public static function cleanCache()
 {
     if (class_cache::$bitCleanupDone === false) {
         $strQuery = "DELETE FROM " . _dbprefix_ . "cache WHERE cache_leasetime < ?";
         class_cache::$bitCleanupDone = true;
         return class_carrier::getInstance()->getObjDB()->_pQuery($strQuery, array(time()));
     }
     return true;
 }