CacheEngine::storeValue PHP Метод

storeValue() абстрактный публичный Метод

Returns true on success, false on failure.
abstract public storeValue ( $p_key, $p_value, $p_ttl ) : boolean
$p_key
$p_value
Результат boolean
    public abstract function storeValue($p_key, $p_value, $p_ttl = 0);

Usage Example

Пример #1
0
 /**
  * Store the given data into cache.
  *
  * @param string
  *    $p_key The cache key for the object
  * @param mixed
  *    $p_data The expected data to be cached
  * @param int optional
  *    $p_ttl The ttl for the object in cache
  *
  * @return boolean
  *                 TRUE on success, FALSE on failure
  */
 public function store($p_key, $p_data, $p_ttl = 0)
 {
     if (!self::$m_enabled) {
         return false;
     }
     self::$m_storeRequests++;
     $p_data = $this->serialize($p_data);
     return $this->m_cacheEngine->storeValue($this->genKey($p_key), $p_data, $p_ttl);
 }