Towns & NPCs & Items should be persistent

This commit is contained in:
slawkens
2023-11-11 12:04:21 +01:00
parent 130ad25c4d
commit 556ef47d59
7 changed files with 8 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ class NPCs
}
require_once LIBS . 'cache_php.php';
$cache_php = new Cache_PHP(config('cache_prefix'), CACHE);
$cache_php = new Cache_PHP(config('cache_prefix'), CACHE . 'persistent');
$cache_php->set('npcs', $npcs, 5 * 365 * 24 * 60 * 60);
return true;
}
@@ -53,7 +53,7 @@ class NPCs
}
require_once LIBS . 'cache_php.php';
$cache_php = new Cache_PHP(config('cache_prefix'), CACHE);
$cache_php = new Cache_PHP(config('cache_prefix'), CACHE . 'persistent');
self::$npcs = $cache_php->get('npcs');
}
}