Beispiel #1
0
 /**
  * Store data to cache by ID and group
  *
  * @param   mixed    $data        The data to store
  * @param   string   $id          The cache data ID
  * @param   string   $group       The cache data group
  * @param   boolean  $wrkarounds  True to use wrkarounds
  *
  * @return  boolean  True if cache stored
  *
  * @since   11.1
  */
 public function store($data, $id, $group = null, $wrkarounds = true)
 {
     $locktest = $this->cache->lock($id, $group);
     if ($locktest->locked == false && $locktest->locklooped == true) {
         $locktest = $this->cache->lock($id, $group);
     }
     $success = $this->cache->store(serialize($data), $id, $group);
     if ($locktest->locked == true) {
         $this->cache->unlock($id, $group);
     }
     return $success;
 }
 /**
  * Store data to cache by id and group
  *
  * @param   mixed   $data   The data to store
  * @param   string  $id     The cache data id
  * @param   string  $group  The cache data group
  *
  * @return  boolean  True if cache was stored
  *
  * @since   11.1
  */
 public function store($data, $id, $group = null)
 {
     $locktest = new stdClass();
     $locktest->locked = null;
     $locktest->locklooped = null;
     $locktest = $this->cache->lock($id, $group);
     if ($locktest->locked == false && $locktest->locklooped == true) {
         $locktest = $this->cache->lock($id, $group);
     }
     $sucess = $this->cache->store(serialize($data), $id, $group);
     if ($locktest->locked == true) {
         $this->cache->unlock($id, $group);
     }
     return $sucess;
 }