/sitecore-content-sdk-angular:content-sdk-angular-loader-cache-and-revalidationfrom Sitecore Content SDK - Angular
Implements server-only loader caching with stale-while-revalidate and a POST /api/revalidate webhook for Angular Content SDK head apps. Use when content is stale after publish or when tuning cache behavior.
Ships in Sitecore Content SDK - Angular. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Angular has no framework ISR. This head app caches loader results instead. Paths are relative to the head app.
Read first: src/server.ts, sitecore.config.ts.
Creation: createLoaderCache({ revalidate, enabled, defaultSiteName, driver }) in src/server.ts, backed by unstorage (memory driver by default; a filesystem driver is shown in the comments).
One instance is passed to all three of: createSitecoreRevalidateMiddleware({ cache, ... }) (the POST /api/revalidate webhook), createLoaderDataServiceMiddleware(config, { loaders, cache }) (the /_data endpoint) and angularApp.handle(req, { cache: loaderCache, req, res }) (the SSR handler).
Configure by editing sitecore.config.ts and passing the values in the first argument of defineConfig:
defineConfig({ angular: { loadersCache: { enabled: true, revalidate: 300 } } }, environment)
Both fields default when omitted (enabled: true, revalidate: 300). scConfig.angular.loadersCache is the resolved read path used by src/server.ts. Per-route overrides go on the resolver: loaderResolver('page', { enabled, revalidate, tags }).
Behaviour: stale-while-revalidate. A hit returns immediately, a stale entry returns immediately and refreshes in the background, a miss runs the loader synchronously. Keys include site, locale and personalization variant. Editing and preview requests bypass the cache entirely (detected via the editing params header). Redirects are never cached.
/_data middleware and angularApp.handle.scConfig.angular.loadersCache; edit sitecore.config.ts.unstorage, createLoaderCache and every create*Middleware are server-only. Never import them from a file reachable by src/main.ts or from src/app/**.POST /api/revalidate with SITECORE_REVALIDATE_SECRET.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub chris1415/sitecore-skills-pocs --plugin sitecore-content-sdk-angular18 skills in this plugin
/content-sdk-angular-component-data-strategyHow a component gets Sitecore data in an Angular Content SDK app: placeholder inputs, route resolve data, SitecoreContextService, no component-level fetch. Use when wiring data or it is missing after navigation. Not Next.js./content-sdk-angular-component-registrationRegisters components in .sitecore/component-map.ts and the SITECORE_COMPONENT_MAP token in an Angular Content SDK app. Use when a component shows as missing or the map changes. Not Next.js./content-sdk-angular-Other plugins' skills for the same job