From ed32a8e87ed42e39b85b3d815ddfea3e1db25d21 Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 17 Jul 2024 14:43:10 +0800 Subject: [PATCH] change cache time of dir snapshot --- themes/beauty/controller/SiteController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index d5d9fda..c1ee8b0 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -181,7 +181,8 @@ Class SiteController extends Controller { }else { //优先从缓存获取 $cacheKey = $this->getCacheKey($cateId, 'dirsnap'); - $cachedData = Common::getCacheFromFile($cacheKey); + $expireSeconds = FSC::$app['config']['screenshot_expire_seconds']; //有效期3650天 + $cachedData = Common::getCacheFromFile($cacheKey, $expireSeconds); if (empty($cachedData)) { //从缓存数据中获取目录的realpath