From 127fca81e006432d763a1c3674c18a8ab0a963c2 Mon Sep 17 00:00:00 2001 From: SMaker Date: Mon, 14 Apr 2014 18:50:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=84=EC=A0=AF=20=EC=BA=90=EC=8B=B1=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=8B=9C=20memcache=EB=82=98=20apc?= =?UTF-8?q?=EC=97=90=20=EC=A0=80=EC=9E=A5=ED=95=A0=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/widget/widget.controller.php | 73 ++++++++++++++++++---------- 1 file changed, 48 insertions(+), 25 deletions(-) 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:@', '