public function setElement($key, $element, $value, $duration = 0)
    {
        $cache = $this->get($key);
        if ($cache === false) {
            $cache = [];
        }
        $cache[$element] = $value;
        return $this->set($key, $cache, $duration);
    }
public function setElement($key, $element, $value, $duration = 0)
    {
        $cache = $this->get($key);
        if ($cache === false) {
            $cache = [];
        }
        $cache[$element] = $value;
        return $this->set($key, $cache, $duration);
    }
public function setElement ( $ key , $ element , $ value , $ duration = 0 ) { $ cache = $ this -> get ( $ key ) ; if ( $ cache === false ) { $ cache = [ ] ; } $ cache [ $ element ] = $ value ; return $ this -> set ( $ key , $ cache , $ duration ) ; }
Stores the value for the element into cache array identified by the key.
@param string $key the key identifying the value to be cached.
@param string $element the key of the element.
@param mixed $value the value to be cached
@param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
@return bool
Stores the value for the element into cache array identified by the key .