Esempio n. 1
0
 /**
  * Load value from swap file.
  *
  * @internal
  * @param \Zend\Memory\Container\Movable $container
  * @param int $id
  */
 public function load(Container\Movable $container, $id)
 {
     $value = $this->cache->getItem($this->managerId . $id);
     // Try to swap other objects if necessary
     // (do not include specified object into check)
     $this->memorySize += strlen($value);
     $this->_swapCheck();
     // Add loaded object to the end of loaded objects list
     $container->setValue($value);
     if ($this->sizes[$id] > $this->minSize) {
         // Add object to the end of "unload candidates list"
         $this->unloadCandidates[$id] = $container;
     }
 }