1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-18 04:22:10 +02:00

Major refactor of WireCache which now isolates the cache getting/saving/deleting to a separate module/class implementing the WireCacheInterface interface. Eventually this will enable one to modify/replace where and how PW's cache data is stored. For instance, file system, Redis, Memcache, etc. The default class is WireCacheDatabase which stores cache data in the database, as WireCache did prior to this update.

This commit is contained in:
Ryan Cramer
2023-05-19 11:12:49 -04:00
parent a76e54193e
commit 6981e3009e
6 changed files with 915 additions and 586 deletions

View File

@@ -378,8 +378,11 @@ class Sanitizer extends Wire {
$value = mb_strtolower($value);
if(empty($replacements)) {
$configData = $this->wire()->modules->getModuleConfigData('InputfieldPageName');
$replacements = empty($configData['replacements']) ? InputfieldPageName::$defaultReplacements : $configData['replacements'];
$modules = $this->wire()->modules;
if($modules) {
$configData = $this->wire()->modules->getModuleConfigData('InputfieldPageName');
$replacements = empty($configData['replacements']) ? InputfieldPageName::$defaultReplacements : $configData['replacements'];
}
}
foreach($replacements as $from => $to) {
@@ -5788,4 +5791,3 @@ class Sanitizer extends Wire {
}
}