Kevinrob\GuzzleCache\Storage\LaravelCacheStorage::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->forever($key, serialize($data));
            } else {
                if ($lifeTime > 0) {
                    return $this->cache->add($key, serialize($data), $lifeTime);
                }
            }
        } catch (\Exception $ignored) {
            // No fail if we can't save it the storage
        }
        return false;
    }
LaravelCacheStorage