mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Fix for Library caching.
This commit is contained in:
@@ -954,18 +954,18 @@ class e_library_manager
|
|||||||
if(!isset($loaded[$name]))
|
if(!isset($loaded[$name]))
|
||||||
{
|
{
|
||||||
$cache = e107::getCache();
|
$cache = e107::getCache();
|
||||||
$cacheID = 'Library_' . e107::getParser()->filter($name,'file');
|
$cacheID = 'Library_' . e107::getParser()->filter($name, 'file');
|
||||||
$cached = $cache->retrieve($cacheID, false, true, true);
|
$cached = $cache->retrieve($cacheID, false, true, true);
|
||||||
|
|
||||||
if($cached)
|
if($cached)
|
||||||
{
|
{
|
||||||
$library = unserialize($cached);
|
$library = e107::unserialize($cached);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!varset($library, false))
|
if(!varset($library, false))
|
||||||
{
|
{
|
||||||
$library = $this->detect($name);
|
$library = $this->detect($name);
|
||||||
$cacheData = e107::serialize($library,'json');
|
$cacheData = e107::serialize($library, 'json');
|
||||||
$cache->set($cacheID, $cacheData, true, true, true);
|
$cache->set($cacheID, $cacheData, true, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user