public __construct ( Nette\Caching\IStorage $storage, $namespace = NULL ) | ||
$storage | Nette\Caching\IStorage |
public function __construct(IStorage $storage, $namespace = NULL)
{
$this->storage = $storage;
$this->namespace = $namespace . self::NAMESPACE_SEPARATOR;
}
public function __construct(Settings $settings) { $storage = new FileStorage($settings->temp_dir); $this->settings = $settings; parent::__construct($storage); $this->cache_data = $this->load($this->settings->cache_name); if ($this->cache_data === null) { $this->save($this->settings->cache_name, array()); $this->cache_data = array(); } }