Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
Zend_Cache_Backend_ZendServer_Disk Class Reference
Inheritance diagram for Zend_Cache_Backend_ZendServer_Disk:
Zend_Cache_Backend_ZendServer Zend_Cache_Backend_Interface Zend_Cache_Backend Zend_Cache_Backend_Interface

Public Member Functions

 __construct (array $options=array())
 
- Public Member Functions inherited from Zend_Cache_Backend_ZendServer
 load ($id, $doNotTestCacheValidity=false)
 
 test ($id)
 
 save ($data, $id, $tags=array(), $specificLifetime=false)
 
 remove ($id)
 
 clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array())
 
- Public Member Functions inherited from Zend_Cache_Backend
 __construct (array $options=array())
 
 setDirectives ($directives)
 
 setOption ($name, $value)
 
 getOption ($name)
 
 getLifetime ($specificLifetime)
 
 isAutomaticCleaningAvailable ()
 
 getTmpDir ()
 
- Public Member Functions inherited from Zend_Cache_Backend_Interface
 setDirectives ($directives)
 

Protected Member Functions

 _store ($data, $id, $timeToLive)
 
 _fetch ($id)
 
 _unset ($id)
 
 _clear ()
 
- Protected Member Functions inherited from Zend_Cache_Backend_ZendServer
 _store ($data, $id, $timeToLive)
 
 _fetch ($id)
 
 _unset ($id)
 
 _clear ()
 
- Protected Member Functions inherited from Zend_Cache_Backend
 _isGoodTmpDir ($dir)
 
 _loggerSanity ()
 
 _log ($message, $priority=4)
 

Additional Inherited Members

- Protected Attributes inherited from Zend_Cache_Backend_ZendServer
 $_options
 
- Protected Attributes inherited from Zend_Cache_Backend
 $_directives
 
 $_options = array()
 

Detailed Description

Definition at line 37 of file Disk.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( array  $options = array())

Constructor

Parameters
array$optionsassociative array of options
Exceptions
Zend_Cache_Exception

Definition at line 45 of file Disk.php.

46  {
47  if (!function_exists('zend_disk_cache_store')) {
48  Zend_Cache::throwException('Zend_Cache_ZendServer_Disk backend has to be used within Zend Server environment.');
49  }
50  parent::__construct($options);
51  }
static throwException($msg, Exception $e=null)
Definition: Cache.php:205

Member Function Documentation

◆ _clear()

_clear ( )
protected

Clear cache

Definition at line 97 of file Disk.php.

98  {
99  zend_disk_cache_clear($this->_options['namespace']);
100  }

◆ _fetch()

_fetch (   $id)
protected

Fetch data

Parameters
string$idCache id
Returns
mixed|null

Definition at line 78 of file Disk.php.

79  {
80  return zend_disk_cache_fetch($this->_options['namespace'] . '::' . $id);
81  }
$id
Definition: fieldset.phtml:14

◆ _store()

_store (   $data,
  $id,
  $timeToLive 
)
protected

Store data

Parameters
mixed$dataObject to store
string$idCache id
int$timeToLiveTime to live in seconds
Returns
boolean true if no problem

Definition at line 61 of file Disk.php.

62  {
63  if (zend_disk_cache_store($this->_options['namespace'] . '::' . $id,
64  $data,
65  $timeToLive) === false) {
66  $this->_log('Store operation failed.');
67  return false;
68  }
69  return true;
70  }
$id
Definition: fieldset.phtml:14
_log($message, $priority=4)
Definition: Backend.php:273

◆ _unset()

_unset (   $id)
protected

Unset data

Parameters
string$idCache id
Returns
boolean true if no problem

Definition at line 89 of file Disk.php.

90  {
91  return zend_disk_cache_delete($this->_options['namespace'] . '::' . $id);
92  }
$id
Definition: fieldset.phtml:14

The documentation for this class was generated from the following file: