mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 01:09:21 +02:00
Towns & NPCs & Items should be persistent
This commit is contained in:
parent
130ad25c4d
commit
556ef47d59
1
.gitignore
vendored
1
.gitignore
vendored
@ -47,6 +47,7 @@ system/cache/*
|
||||
!system/cache/twig/index.html
|
||||
!system/cache/signatures/index.html
|
||||
!system/cache/plugins/index.html
|
||||
!system/cache/persistent/index.html
|
||||
|
||||
# logs
|
||||
system/logs/*
|
||||
|
0
system/cache/persistent/index.html
vendored
Normal file
0
system/cache/persistent/index.html
vendored
Normal file
@ -1262,7 +1262,7 @@ function clearCache()
|
||||
deleteDirectory(CACHE . 'signatures', ['index.html'], true);
|
||||
deleteDirectory(CACHE . 'twig', ['index.html'], true);
|
||||
deleteDirectory(CACHE . 'plugins', ['index.html'], true);
|
||||
deleteDirectory(CACHE, ['signatures', 'twig', 'plugins', 'index.html'], true);
|
||||
deleteDirectory(CACHE, ['signatures', 'twig', 'plugins', 'index.html', 'persistent'], true);
|
||||
|
||||
// routes cache
|
||||
$routeCacheFile = CACHE . 'route.cache';
|
||||
|
@ -38,7 +38,7 @@ class DataLoader
|
||||
{
|
||||
self::$startTime = microtime(true);
|
||||
|
||||
require LIBS . 'items.php';
|
||||
require_once LIBS . 'items.php';
|
||||
if(Items::loadFromXML()) {
|
||||
success(self::$locale['step_database_loaded_items'] . self::getLoadedTime());
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class Towns
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private static $filename = CACHE . 'towns.php';
|
||||
private static $filename = CACHE . 'persistent' . 'towns.php';
|
||||
|
||||
/**
|
||||
* Determine towns
|
||||
|
@ -40,7 +40,7 @@ class Items
|
||||
}
|
||||
|
||||
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('items', $items, 5 * 365 * 24 * 60 * 60);
|
||||
return true;
|
||||
}
|
||||
@ -68,7 +68,7 @@ class Items
|
||||
}
|
||||
|
||||
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::$items = $cache_php->get('items');
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user