Ejemplo n.º 1
0
 public function getCacheStats()
 {
     // collect basic data
     $out = parent::getCacheStats();
     // add urls waiting to be written
     $out .= 'In memory, waiting to be written  : ' . $this->_newUrlsCacheCount . '<br />';
     // add ram usage of cached urls read from disk file
     // and stored in ram
     $out .= 'Ram used  : ' . $this->_urlCacheRam . '<br />';
     return $out;
 }
Ejemplo n.º 2
0
 /**
  * Provides an object with cache usage stats
  * for the current page load only
  */
 public function getCacheStats()
 {
     $out = 'Handler      : Shared memory (' . ShlCache_Manager::getHandler() . ')<br />';
     // collect data from cache manager
     $stats = ShlCache_Manager::getCacheStats(self::CACHE_STATS_DATASET_NAME);
     $this->_urlCacheMisses = $stats->read - $stats->hits;
     $this->_urlCacheHits = $stats->hits;
     // have parent method format that
     $out .= parent::getCacheStats();
     return $out;
 }