feat: enhance SSR cache management with dependency tracking and entry-level invalidation

This commit is contained in:
2026-02-25 17:35:10 +00:00
parent 3886eb9f34
commit 3b84e49383
8 changed files with 96 additions and 86 deletions

View File

@@ -1,5 +1,11 @@
var utils = require("./lib/utils")
;(function () {
utils.clearSSRCache()
const col = context.collection()
const collectionName = col && col.name ? col.name : null
const req = context.request()
const method = req.method
const entryId = (context.data && !Array.isArray(context.data) && context.data.id) || req.param("id") || null
utils.clearSSRCache(collectionName, entryId, method)
})()