Skip to content

Commit

Permalink
cookie beta
Browse files Browse the repository at this point in the history
  • Loading branch information
AzadDevX committed Mar 30, 2024
1 parent 9155537 commit afb0768
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ public function Close () {
parent::Log("################## Database Data");
parent::Log(json_encode(parent::$Tables[$this->HashID],128|256));
};
if (isset(parent::$SystemConfig[$this->HashID]["Cache"]) && file_exists(parent::$SystemConfig[$this->HashID]["Cache"])) {
$data = serialize(parent::$Tables[$this->HashID]);
file_put_contents(parent::$SystemConfig[$this->HashID]["Cache"],$data);
}

}
}
4 changes: 4 additions & 0 deletions src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ protected function SaveToRam ($table_name,$data) {
self::$Tables[self::$MyHash][$table_name]['list'] = $new_data;
self::$CountRamInput += 1;
}
if (isset(self::$SystemConfig[self::$MyHash]["Cache"]) && file_exists(self::$SystemConfig[self::$MyHash]["Cache"])) {
$data = serialize(self::$Tables[self::$MyHash]);
file_put_contents(self::$SystemConfig[self::$MyHash]["Cache"],$data);
}
if (in_array("save_ram",self::$Log[self::$MyHash]['save'])) { self::Log(self::DateLog ()." \n Set data for Ram: TableName: [".$table_name."] \n WHERE PRIMARYS: ".json_encode(self::$Tables[self::$MyHash][$table_name]['where_by_primary'],128|256)." \n New List Data: ".json_encode($new_data,128|256)." \n Old List Data: ".json_encode($OldDataForLog,128|256).""); };
}
protected function GetFromRam ($table_name,$id) {
Expand Down

0 comments on commit afb0768

Please sign in to comment.