cache save

This commit is contained in:
CHIEFSOFT\ameye
2024-11-28 17:15:44 -05:00
parent eb4bc69a14
commit d5a74f1829
2 changed files with 9 additions and 4 deletions
+8 -3
View File
@@ -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);