src/Webiny/Hrc/CacheStorage/FileSystem.php
public function save($key, $content, $ttl)
    {
        $cacheFile = $this->getCachePath($key);
        $cache = json_encode(['ttl' => (time() + $ttl), 'content' => $content]);

        file_put_contents($cacheFile, $cache);

        return true;
    }
public function save($key, $content, $ttl)
    {
        $cacheFile = $this->getCachePath($key);
        $cache = json_encode(['ttl' => (time() + $ttl), 'content' => $content]);

        file_put_contents($cacheFile, $cache);

        return true;
    }
public function save ( $ key , $ content , $ ttl ) { $ cacheFile = $ this -> getCachePath ( $ key ) ; $ cache = json_encode ( [ 'ttl' => ( time ( ) + $ ttl ) , 'content' => $ content ] ) ; file_put_contents ( $ cacheFile , $ cache ) ; return true ; }
Save the given content into cache.

@param string $key     Cache key.
@param string $content Content that should be saved.
@param string $ttl     Cache time-to-live

@return bool
Save the given content into cache .