Kevinrob\GuzzleCache\Storage\CompressedDoctrineCacheStorage::save PHP Method

save() public method

public save ( $key, CacheEntry $data )
$data Kevinrob\GuzzleCache\CacheEntry
    public function save($key, CacheEntry $data)
    {
        try {
            $lifeTime = $data->getTTL();
            if ($lifeTime >= 0) {
                return $this->cache->save($key, gzcompress(serialize($data)), $lifeTime);
            }
        } catch (\Exception $ignored) {
            // No fail if we can't save it the storage
        }
        return false;
    }
CompressedDoctrineCacheStorage