5 * Definition of Drush\Cache\JSONCache.
11 * JSON cache storage backend.
13 class JSONCache extends FileCache {
14 const EXTENSION = '.json';
16 function readFile($filename) {
17 $item = file_get_contents($filename);
18 return $item ? (object)drush_json_decode($item) : FALSE;
21 function writeFile($filename, $cache) {
22 return file_put_contents($filename, drush_json_encode($cache));