You are here

function performance_prune_zend in Performance Logging and Monitoring 7

Same name and namespace in other branches
  1. 6 performance.module \performance_prune_zend()

Helper function to cleanup Zend Datacache data.

See also

performance_data_stores()

File

./performance.module, line 771
Logs detailed and/or summary page generation time and memory consumption for page requests. Copyright Khalid Baheyeldin 2008 of http://2bits.com

Code

function performance_prune_zend($timestamp = 0) {
  if ($keys_values = zend_shm_cache_fetch(PERFORMANCE_ZEND_KEYS)) {
    if ($keys_values !== FALSE) {
      foreach ($keys_cache as $key => $v) {
        $cache = zend_shm_cache_fetch($key);
        if ($cache['created'] <= $timestamp) {
          zend_shm_cache_delete($key);
        }
      }
    }
  }
}