hotfix CCache and enable use cache

This commit is contained in:
rsgrinko committed 2021-12-03 23:00:02 +03:00
1 parent d5bdfbc33c
commit 1e7ba3faa6
2 files changed
+13 -10

No files matched your search

+4 -8
View File
@@ -86,17 +86,13 @@ class CCache
* Получение кэшированых данных из кэша
*
* @param string $name Имя элемента кэша
* @return false|mixed Кэшированные данные
* @return mixed Кэшированные данные
*/
public static function getCache($name)
{ // Получить элемент из кэша
public static function getCache(string $name)
{
self::$quantity++;
self::$quantity_read++;
if (self::checkCache($name)) {
return unserialize(base64_decode(file_get_contents(self::$cache_dir . md5($name) . '.tmp')));
} else {
return false;
}
return unserialize(base64_decode(file_get_contents(self::$cache_dir . md5($name) . '.tmp')));
}
/**