Skip to content

Commit

Permalink
Fix DataLoader Towns cache
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Jan 7, 2025
1 parent b8396d4 commit 99262c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/src/DataLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public static function load()
self::$startTime = microtime(true);

$cache = Cache::getInstance();
$cache->delete('towns'); // will be reloaded after next page load
if ($cache->enabled()) {
$cache->delete('towns'); // will be reloaded after next page load
}

global $db;
if ($db->hasTable('towns') && Town::count() > 0) {
Expand Down

0 comments on commit 99262c3

Please sign in to comment.