Back to RedisStorage class

Method store

public bool
store
(mixed $id, mixed $group, mixed $data)
Store the data to cache by ID and group
Parameters
  • string $id The cache data ID
  • string $group The cache data group
  • string $data The data to store in cache
Returns
  • bool
Since
  • 3.4
Class: RedisStorage
Project: Joomla

Method store - Source code

/**
 * Store the data to cache by ID and group
 *
 * @param   string  $id     The cache data ID
 * @param   string  $group  The cache data group
 * @param   string  $data   The data to store in cache
 *
 * @return  boolean
 *
 * @since   3.4
 */
public function store($id, $group, $data)
{
    if (static::isConnected() == false) {
        return false;
    }
    static::$_redis->setex($this->_getCacheId($id, $group), $this->_lifetime, $data);
    return true;
}