This commit is contained in:
make
2026-01-09 22:06:58 +08:00
parent 0d12792f65
commit 867a514758
2 changed files with 8 additions and 0 deletions

View File

@@ -190,6 +190,9 @@ class SiteContext
// 1. 站点 DNA // 1. 站点 DNA
$TpStyle = $this->TpStyle; $TpStyle = $this->TpStyle;
define('SITE_SEED', $TpStyle['seed']); // 你已有的站点 seed
// 3. 构建本域名 CSS合并并替换 __PFX__ // 3. 构建本域名 CSS合并并替换 __PFX__
$strCssUrl = CssBuilder::build( $strCssUrl = CssBuilder::build(
$TpStyle['css_files'], $TpStyle['css_files'],

View File

@@ -35,6 +35,11 @@ return [
// 是否开启模板编译缓存,设为false则每次都会重新编译 // 是否开启模板编译缓存,设为false则每次都会重新编译
'tpl_cache' => env('VIEW_TPL_CACHE', false), 'tpl_cache' => env('VIEW_TPL_CACHE', false),
// ⭐⭐⭐ 关键:模板编译缓存隔离前缀(防止多域名串模板)
'cache_prefix' => md5(
($_SERVER['HTTP_HOST'] ?? 'cli') . '|' . (defined('SITE_SEED') ? SITE_SEED : '')
),
//页面数据缓存 //页面数据缓存
'view_data_cache' => env('VIEW_DATA_CACHE', false), 'view_data_cache' => env('VIEW_DATA_CACHE', false),