Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/application.php
Show First 20 Lines • Show All 864 Lines • ▼ Show 20 Line(s) | |||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function getCache($key, $store_locally = true, $max_rebuild_seconds = 0) | public function getCache($key, $store_locally = true, $max_rebuild_seconds = 0) | ||||
{ | { | ||||
return $this->cacheManager->getCache($key, $store_locally, $max_rebuild_seconds); | return $this->cacheManager->getCache($key, $store_locally, $max_rebuild_seconds); | ||||
} | } | ||||
/** | /** | ||||
* Stores new $value in cache with $key name | * Stores new $value in cache with $name name. | ||||
* | * | ||||
* @param int $key key name to add to cache | * @param string $name Key name to add to cache. | ||||
* @param mixed $value value of cached record | * @param mixed $value Value of cached record. | ||||
* @param int $expiration when value expires (0 - doesn't expire) | * @param integer|null $expiration When value expires (0 - doesn't expire). | ||||
* @return bool | * | ||||
* @access public | * @return boolean | ||||
*/ | */ | ||||
public function setCache($key, $value, $expiration = 0) | public function setCache($name, $value, $expiration = null) | ||||
{ | { | ||||
return $this->cacheManager->setCache($key, $value, $expiration); | return $this->cacheManager->setCache($name, $value, $expiration); | ||||
} | } | ||||
/** | /** | ||||
* Stores new $value in cache with $key name (only if it's not there) | * Stores new $value in cache with $key name (only if it's not there) | ||||
* | * | ||||
* @param int $key key name to add to cache | * @param string $name Key name to add to cache. | ||||
* @param mixed $value value of cached record | * @param mixed $value Value of cached record. | ||||
* @param int $expiration when value expires (0 - doesn't expire) | * @param integer|null $expiration When value expires (0 - doesn't expire). | ||||
* @return bool | * | ||||
* @access public | * @return boolean | ||||
*/ | */ | ||||
public function addCache($key, $value, $expiration = 0) | public function addCache($name, $value, $expiration = null) | ||||
{ | { | ||||
return $this->cacheManager->addCache($key, $value, $expiration); | return $this->cacheManager->addCache($name, $value, $expiration); | ||||
} | } | ||||
/** | /** | ||||
* Sets rebuilding mode for given cache | * Sets rebuilding mode for given cache | ||||
* | * | ||||
* @param string $name | * @param string $name | ||||
* @param int $mode | * @param int $mode | ||||
* @param int $max_rebuilding_time | * @param int $max_rebuilding_time | ||||
Show All 37 Lines | |||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function getDBCache($name, $max_rebuild_seconds = 0) | public function getDBCache($name, $max_rebuild_seconds = 0) | ||||
{ | { | ||||
return $this->cacheManager->getDBCache($name, $max_rebuild_seconds); | return $this->cacheManager->getDBCache($name, $max_rebuild_seconds); | ||||
} | } | ||||
/** | /** | ||||
* Sets value to database cache | * Sets value to database cache. | ||||
* | |||||
* @param string $name Key name to add to cache. | |||||
* @param mixed $value Value of cached record. | |||||
* @param integer|null $expiration When value expires (0 - doesn't expire). | |||||
* | * | ||||
* @param string $name | |||||
* @param mixed $value | |||||
* @param int|bool $expiration | |||||
* @return void | * @return void | ||||
* @access public | |||||
*/ | */ | ||||
public function setDBCache($name, $value, $expiration = false) | public function setDBCache($name, $value, $expiration = null) | ||||
{ | { | ||||
$this->cacheManager->setDBCache($name, $value, $expiration); | $this->cacheManager->setDBCache($name, $value, $expiration); | ||||
} | } | ||||
/** | /** | ||||
* Sets rebuilding mode for given cache | * Sets rebuilding mode for given cache | ||||
* | * | ||||
* @param string $name | * @param string $name | ||||
▲ Show 20 Lines • Show All 2194 Lines • Show Last 20 Lines |