예제 #1
0
 public function save($data, $id, $tags = array(), $specificLifetime = false)
 {
     if ($this->_options['compression']) {
         $data = gzdeflate($data);
     }
     return parent::save($data, $id, $tags, $specificLifetime);
 }
예제 #2
0
 /**
  * Extended parent save method
  * Save some string datas into a cache record
  *
  * Note : $data is always "string" (serialization is done by the
  * core not by the backend)
  *
  * @param  string $data             Datas to cache
  * @param  string $id               Cache id
  * @param  array  $tags             Array of strings, the cache record will be tagged by each string entry
  * @param  int    $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime)
  * @return boolean true if no problem
  */
 public function save($data, $id, $tags = array(), $specificLifetime = false)
 {
     if (count(array_intersect($tags, $this->_disabledTags))) {
         return false;
     }
     if (!$specificLifetime && count($tags)) {
         $specificLifetime = Axis::single('core/cache')->getLifetimeByTags($tags);
     }
     return parent::save($data, $id, $tags, $specificLifetime);
 }