diff --git a/modules/widget/widget.controller.php b/modules/widget/widget.controller.php index 8c6587b9d..613ea39d3 100644 --- a/modules/widget/widget.controller.php +++ b/modules/widget/widget.controller.php @@ -374,35 +374,58 @@ class widgetController extends widget return $widget_content; } - /** - * Cache number and cache values are set so that the cache file should call - */ - FileHandler::makeDir($this->cache_path); - // Wanted cache file - $cache_file = sprintf('%s%d.%s.cache', $this->cache_path, $widget_sequence, $lang_type); - // If the file exists in the cache, the file validation - if(!$ignore_cache && file_exists($cache_file)) + $oCacheHandler = CacheHandler::getInstance('template'); + if($oCacheHandler->isSupport()) { - $filemtime = filemtime($cache_file); - // Should be modified compared to the time of the cache or in the future if creating more than widget.controller.php file a return value of the cache - if($filemtime + $widget_cache * 60 > $_SERVER['REQUEST_TIME'] && $filemtime > filemtime(_XE_PATH_.'modules/widget/widget.controller.php')) - { - $cache_body = FileHandler::readFile($cache_file); - $cache_body = preg_replace('@<\!--#Meta:@', '