Example #1
0
 public function flush()
 {
     foreach ($this->objects as $className => $objects) {
         $this->cache->setNamespace($className);
         $this->cache->saveMultiple($objects);
     }
 }
Example #2
0
 /**
  * @param array $criteria
  *
  * @return object[]
  */
 public function findOneBy(array $criteria)
 {
     $this->cache->setNamespace($this->className);
     $id = $this->getId($criteria);
     return $this->cache->fetch($id);
 }