Exemple #1
0
 /**
  * Gets the index entry from memcache/apc DB.
  */
 private function load_index()
 {
     if (!$this->db) {
         return;
     }
     if ($this->index !== null) {
         return;
     }
     $index_key = $this->ikey();
     if ($this->type == 'memcache') {
         $data = $this->db->get($index_key);
     } else {
         if ($this->type == 'apc') {
             $data = apc_fetch($index_key);
         }
     }
     $this->index = $data ? unserialize($data) : array();
 }