yii\caching\Cache::offsetSet PHP Method

offsetSet() public method

If the cache already contains such a key, the existing value will be replaced with the new ones. To add expiration and dependencies, use the Cache::set method. This method is required by the interface [[\ArrayAccess]].
public offsetSet ( string $key, mixed $value )
$key string the key identifying the value to be cached
$value mixed the value to be cached
    public function offsetSet($key, $value)
    {
        $this->set($key, $value);
    }