Beispiel #1
0
 /**
  * Store cache set information
  *
  * @param $event
  */
 public function onCacheSet(CacheEvent $event)
 {
     $key = $event->getCacheabledata()->getHashKey();
     if (isset(self::$collectedData[$key]['set'])) {
         self::$collectedData[$key]['set']++;
     } else {
         self::$collectedData[$key]['set'] = 1;
     }
     self::$collectedData[$key]['size'] = strlen($event->getCacheabledata()->getDataForCache());
 }
Beispiel #2
0
 /**
  * Store cache remove information
  *
  * @param $event
  */
 public function onCacheRemove(CacheEvent $event)
 {
     $key = $event->getCacheabledata()->getHashKey();
     if (isset(self::$data[$key]['remove'])) {
         self::$data[$key]['remove']++;
     } else {
         self::$data[$key]['remove'] = 1;
     }
     self::$removeCount++;
 }