cache delete
This commit is contained in:
@@ -112,6 +112,16 @@ abstract class BaseController extends Controller
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function deleteCache($cacheKey){
|
||||
$data = [];
|
||||
$cacheKey = $this->cache_tag."-".$cacheKey;
|
||||
if (cache($cacheKey)) {
|
||||
// echo 'Getting Data From Cache!<br>';
|
||||
$data = unserialize(cache()->delete($cacheKey));
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
private function data_stringify($data) {
|
||||
switch (gettype($data)) {
|
||||
case 'string' : return '\''.addcslashes($data, "'\\").'\'';
|
||||
|
||||
Reference in New Issue
Block a user