예제 #1
0
 public function getNumHolds($id)
 {
     /** @var Memcache $memCache */
     global $memCache;
     $key = 'num_holds_' . $id;
     $cachedValue = $memCache->get($key);
     if ($cachedValue == false || isset($_REQUEST['reload'])) {
         $cachedValue = $this->driver->getNumHolds($id);
         global $configArray;
         $memCache->add($key, $cachedValue, 0, $configArray['Caching']['item_data']);
     }
     return $cachedValue;
 }