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
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Contracts\Extension\CacheInterface;
|
||||
use App\Contracts\Repositories\LayoutExtensionRepositoryInterface;
|
||||
use App\Contracts\Repositories\LayoutExtensionVersionRepositoryInterface;
|
||||
use App\Contracts\Repositories\LayoutRepositoryInterface;
|
||||
@@ -15,6 +14,7 @@ use App\Extension\HookManager;
|
||||
use App\Extension\ModuleManager;
|
||||
use App\Extension\PluginManager;
|
||||
use App\Extension\TemplateManager;
|
||||
use App\Extension\Traits\ClearsTemplateCaches;
|
||||
use App\Extension\Traits\ComputesLayoutContentHash;
|
||||
use App\Models\LayoutExtension;
|
||||
use App\Models\TemplateLayoutExtensionVersion;
|
||||
@@ -32,6 +32,7 @@ use Illuminate\Support\Facades\Log;
|
||||
*/
|
||||
class LayoutExtensionService
|
||||
{
|
||||
use ClearsTemplateCaches;
|
||||
use ComputesLayoutContentHash;
|
||||
|
||||
/**
|
||||
@@ -123,7 +124,6 @@ class LayoutExtensionService
|
||||
private LayoutExtensionRepositoryInterface $repository,
|
||||
private LayoutExtensionVersionRepositoryInterface $versionRepository,
|
||||
private LayoutRepositoryInterface $layoutRepository,
|
||||
private CacheInterface $cache,
|
||||
private PluginRepositoryInterface $pluginRepository,
|
||||
private ModuleRepositoryInterface $moduleRepository,
|
||||
) {}
|
||||
@@ -1830,8 +1830,10 @@ class LayoutExtensionService
|
||||
}
|
||||
|
||||
// extension_point 는 여러 레이아웃에서 사용될 수 있으므로 전역 캐시 버전 갱신
|
||||
// overlay 도 프론트엔드 브라우저 캐시 무효화를 위해 동일하게 갱신
|
||||
$this->cache->put('ext.cache_version', time());
|
||||
// overlay 도 프론트엔드 브라우저 캐시 무효화를 위해 동일하게 갱신.
|
||||
// 쓰기는 트레이트 단일 지점(고정 CoreCacheDriver + 메모이즈 스토어) 경유 —
|
||||
// 주입 CacheInterface 직접 put 은 재바인딩/스토어 상이 시 read 와 어긋난다.
|
||||
$this->incrementExtensionCacheVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user