cache save
This commit is contained in:
@@ -135,10 +135,15 @@ abstract class BaseController extends Controller
|
||||
public function deleteCache($cacheKey){
|
||||
$data = [];
|
||||
$cacheKey = $this->cache_tag."-".$cacheKey;
|
||||
if (cache($cacheKey)) {
|
||||
// echo 'Getting Data From Cache!<br>';
|
||||
$data = unserialize(cache()->delete($cacheKey));
|
||||
try {
|
||||
if (cache($cacheKey)) {
|
||||
// echo 'Getting Data From Cache!<br>';
|
||||
$data = unserialize(cache()->delete($cacheKey));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
private function data_stringify($data) {
|
||||
|
||||
@@ -40,7 +40,7 @@ class WrenchUserContacts extends BaseController
|
||||
$time_to_save = false;
|
||||
$endpoint = "CONTACTS_IMPORT_ACTION-". $member_uid;
|
||||
|
||||
$outC = $this->getCache($endpoint); // try find in cache
|
||||
// $outC = $this->getCache($endpoint); // try find in cache
|
||||
if ( $in["mmode"] == 0 ){
|
||||
$in["raw_contacts_0"] = $in["raw_contacts"]; // extra store raw
|
||||
$this->deleteCache($endpoint);
|
||||
|
||||
Reference in New Issue
Block a user