Skip to main content

implement-client-side-caching

Implement client-side caching with explicit ownership, freshness, invalidation, isolation, and recovery. Use when browser data reuse can improve latency or resilience without misleading users.

Datos de origen

Repositorio
protosphinx/sphinxstack
Última actividad en el origen
29 de julio de 2026 a las 13:55
Idioma detectado de SKILL.md
inglés
Estrellas
3
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
2 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
implement-client-side-caching
category
web
description
Implement client-side caching with explicit ownership, freshness, invalidation, isolation, and recovery. Use when browser data reuse can improve latency or resilience without misleading users.
# implement-client-side-caching Cache only data whose stale and cross-session behavior is understood. ## Procedure 1. Inventory candidate data, owner, sensitivity, size, update rate, and freshness contract. 2. Choose memory, HTTP, service-worker, or persistent storage by lifecycle and trust boundary. 3. Define cache key, account, tenant, locale, version, and authorization dimensions. 4. Set freshness, stale use, revalidation, invalidation, eviction, and quota behavior. 5. Prevent older responses and concurrent mutations from overwriting newer state. 6. Clear or partition data on logout, account switch, permission change, and schema migration. 7. Expose stale, refreshing, offline, conflict, and failure states honestly. 8. Test hit, miss, expiry, race, eviction, offline, upgrade, and cross-account isolation. 9. Measure latency benefit, correctness, storage, and stale-result frequency. ## Guardrails - Never reuse private cached data across identities or tenants. - Cache presence does not grant current authorization. - Avoid indefinite stale fallback for consequential decisions. ## Done - A client cache policy report documents keys, freshness, lifecycle, and isolation - Race, expiry, offline, migration, and account-transition cases are tested - Cached, network, and visible state reconcile
Ver en GitHub