Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 624 Bytes

File metadata and controls

38 lines (30 loc) · 624 Bytes

SimpleFileCache

simple file cache


use FileCache;

$id = 'dragonball';
$fileCache = new FileCache($id);

$cachename = 'carrot';
// All types : object, array, string, int...
$values = ['powerCount'=>'12352312423', 'powerType'=>'Superscient_3'];
$timeSecond = '3600';
$fileCache->set($cachename, $values , $timeSecond);


use FileCache;

$id = 'dragonball';
$fileCache = new FileCache($id);

$cachename = 'carrot';
$cacheDatas = $fileCache->get($cachename);
/*
    result data:

    [
        'powerCount'=>'12352312423',
        'powerType'=>'Superscient_3'
    ]
*/