public function saveCache($cacheKey, $data, $cacheTags = [], $lifetime = self::DEFAULT_LIFETIME)
    {
        $this->localCache[$cacheKey] = $data;

        if (!is_string($data)) {
            $data = serialize($data);
        }

        $this->cache->save($data, $cacheKey, $cacheTags, $lifetime);
    }
public function saveCache($cacheKey, $data, $cacheTags = [], $lifetime = self::DEFAULT_LIFETIME)
    {
        $this->localCache[$cacheKey] = $data;

        if (!is_string($data)) {
            $data = serialize($data);
        }

        $this->cache->save($data, $cacheKey, $cacheTags, $lifetime);
    }
public function saveCache ( $ cacheKey , $ data , $ cacheTags = [ ] , $ lifetime = self :: DEFAULT_LIFETIME ) { $ this -> localCache [ $ cacheKey ] = $ data ; if ( ! is_string ( $ data ) ) { $ data = serialize ( $ data ) ; } $ this -> cache -> save ( $ data , $ cacheKey , $ cacheTags , $ lifetime ) ; }
Save some data into an index cache.

@param string   $cacheKey  Cache key.
@param mixed    $data      Data.
@param string[] $cacheTags Cache tags.
@param integer  $lifetime  Cache lifetime.
Save some data into an index cache .