Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00017 final class eAcceleratorSegmentHandler extends OptimizerSegmentHandler
00018 {
00019 public function __construct($segmentId)
00020 {
00021 parent::__construct($segmentId);
00022
00023 $this->locker = Singleton::getInstance('eAcceleratorLocker');
00024 }
00025
00026 public function drop()
00027 {
00028 return eaccelerator_rm($this->id);
00029 }
00030
00031 protected function getMap()
00032 {
00033 $this->locker->get($this->id);
00034
00035 if (!$map = eaccelerator_get($this->id)) {
00036 $map = array();
00037 }
00038
00039 return $map;
00040 }
00041
00042 protected function storeMap(array $map)
00043 {
00044 $result = eaccelerator_put($this->id, $map, Cache::EXPIRES_FOREVER);
00045
00046 $this->locker->free($this->id);
00047
00048 return $result;
00049 }
00050 }
00051 ?>