expand cache
This commit is contained in:
@@ -51,13 +51,13 @@ abstract class BaseController extends Controller
|
||||
// E.g.: $this->session = \Config\Services::session();
|
||||
}
|
||||
|
||||
public function saveCache($cacheKey,$data){
|
||||
public function saveCache($cacheKey,$data,$timeLine=5000){
|
||||
$cacheKey = CACHE_DOMAIN."-".$cacheKey;
|
||||
// $cache = \Config\Services::cache();
|
||||
if (! $foo = cache($cacheKey)) {
|
||||
// echo 'Saving to the cache!<br>';
|
||||
// cache()->save($cacheKey, $this->data_stringify($data), 3000);
|
||||
cache()->save($cacheKey, serialize($data), 3000);
|
||||
cache()->save($cacheKey, serialize($data), $timeLine);
|
||||
|
||||
//serialize
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user