fix(core): 공개 템플릿 config 캐시 무효화 누락과 확장 캐시 삭제 경로 동종 결함 정비
공개 config.json 의 고정 캐시 키(template.config.{identifier})가 어떤 갱신
경로에서도 forget 되지 않아 template:update/cache-clear/비활성화/삭제 후에도
최대 1시간(TTL) 이전 manifest 로 응답되던 결함(공개 )을 수정한다.
- TemplateManager::clearTemplateCache 공개화 — config/components_manifest(두
변종)/현재 버전 routes·language 키 능동 forget, updateTemplate cleanup 호출
- forgetLayoutCacheKeys 가 편집기용 .with_source_meta 변종까지 삭제
- ext.cache_version 쓰기를 incrementExtensionCacheVersion 단일 지점으로 통일
- module/plugin:cache-clear 의 유령 키 forget 을 실재 캐시(레이아웃 서빙/해석
캐시, 상태 키, 미들웨어 인덱스, 버전 bump) 무효화로 교체
- 공개 routes/language/layout API 의 ?v 생략 폴백을 0 → 현재 버전으로 교정
This commit is contained in:
1 parent
09a700e4c7
commit
e819db9d42
27 files changed
+891
-247
No files matched your search
@@ -12,6 +12,7 @@ use App\Exceptions\CircularReferenceException;
|
||||
use App\Exceptions\ConcurrentModificationException;
|
||||
use App\Exceptions\LayoutIncludeException;
|
||||
use App\Extension\HookManager;
|
||||
use App\Extension\Traits\ClearsTemplateCaches;
|
||||
use App\Helpers\PermissionHelper;
|
||||
use App\Models\TemplateLayout;
|
||||
use App\Models\User;
|
||||
@@ -21,6 +22,8 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
class LayoutService
|
||||
{
|
||||
use ClearsTemplateCaches;
|
||||
|
||||
/**
|
||||
* LayoutRepository, LayoutVersionRepository, TemplateRepository, LayoutResolverService 및 LayoutExtensionService 주입
|
||||
*/
|
||||
@@ -1470,7 +1473,9 @@ class LayoutService
|
||||
// 프론트엔드 브라우저 캐시 무효화를 위해 ext.cache_version 증가
|
||||
// PublicLayoutController가 ?v={version} 기반 HTTP 캐시를 사용하므로
|
||||
// 버전 변경 시 브라우저가 새 URL로 인식하여 캐시를 우회합니다.
|
||||
$this->cache->put('ext.cache_version', time());
|
||||
// 쓰기는 트레이트 단일 지점(고정 CoreCacheDriver + 메모이즈 스토어) 경유 —
|
||||
// 주입 CacheInterface 직접 put 은 재바인딩/스토어 상이 시 read 와 어긋난다.
|
||||
$this->incrementExtensionCacheVersion();
|
||||
|
||||
// After 훅 - 레이아웃 업데이트 후
|
||||
HookManager::doAction('core.layout.after_update', $layout, $templateId, $name, $data);
|
||||
@@ -1579,8 +1584,8 @@ class LayoutService
|
||||
// 캐시 무효화
|
||||
$this->clearDependentLayoutsCache($templateId, $name);
|
||||
|
||||
// 프론트엔드 브라우저 캐시 무효화
|
||||
$this->cache->put('ext.cache_version', time());
|
||||
// 프론트엔드 브라우저 캐시 무효화 (트레이트 단일 지점 경유)
|
||||
$this->incrementExtensionCacheVersion();
|
||||
|
||||
// After 훅 - 버전 복원 후
|
||||
HookManager::doAction('core.layout.after_version_restore', $newVersion, $templateId, $name, $versionId);
|
||||
|
||||
Reference in new issue
Block a user