Skip to content

Commit

Permalink
Merge pull request #9133 from WWBN/main
Browse files Browse the repository at this point in the history
Main
  • Loading branch information
DanielnetoDotCom authored Jun 14, 2024
2 parents 7d754df + ff0df9c commit 656f11b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugin/Cache/Objects/CacheDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ public static function encodeContent($content)
public static function deleteCacheStartingWith($name, $schedule=true)
{
if($schedule){
$newSchedule = new Cache_schedule_delete(0);
$newSchedule->setName($name);
return $newSchedule->save();
//insert
return Cache_schedule_delete::insert($name);
}else{
try {
if(self::$cacheType == self::$CACHE_ON_MEMORY){
Expand Down
10 changes: 10 additions & 0 deletions plugin/Cache/Objects/Cache_schedule_delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,15 @@ function getName() {
return $this->name;
}

public static function insert($name) {
$sql = "INSERT IGNORE INTO cache_schedule_delete (name) VALUES (?)";
$res = sqlDAL::writeSql($sql, "s", [$name]);
if ($res) {
return true;
} else {
error_log("ObjectYPT::insert::Error on save: " . $sql . " Error : " . json_encode($res));
return false;
}
}

}

0 comments on commit 656f11b

Please sign in to comment.