[Scummvm-git-logs] scummvm-web master -> e31bcc340c5ccb51b3eb6454b86d84ddfad144c0

Thunderforge noreply at scummvm.org
Wed Apr 26 17:35:45 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
e31bcc340c WEB: Replacing : in cache keys


Commit: e31bcc340c5ccb51b3eb6454b86d84ddfad144c0
    https://github.com/scummvm/scummvm-web/commit/e31bcc340c5ccb51b3eb6454b86d84ddfad144c0
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2023-04-26T12:35:37-05:00

Commit Message:
WEB: Replacing : in cache keys

Colon is not a permitted character. See https://github.com/PHPSocialNetwork/phpfastcache/wiki/%5BV6Ë–%5D-Unsupported-characters-in-key-identifiers

Changed paths:
    include/Models/BasicModel.php


diff --git a/include/Models/BasicModel.php b/include/Models/BasicModel.php
index 9499961e..50a751e7 100644
--- a/include/Models/BasicModel.php
+++ b/include/Models/BasicModel.php
@@ -58,6 +58,7 @@ abstract class BasicModel
         }
         global $lang;
         $cacheKey = str_replace("\\", "_", \get_called_class() . $key . "_$lang");
+        $cacheKey = str_replace(":", "_", $cacheKey);
         self::$cache->set($cacheKey, $data, 3600);
     }
 
@@ -72,6 +73,7 @@ abstract class BasicModel
         }
         global $lang;
         $cacheKey = str_replace("\\", "_", \get_called_class() . $key . "_$lang");
+        $cacheKey = str_replace(":", "_", $cacheKey);
         $cachedData = self::$cache->get($cacheKey);
         return $cachedData;
     }




More information about the Scummvm-git-logs mailing list