@saazip/cache-core
Sources:
packages/sdk/package.json|packages/sdk/src/index.ts
Purpose
Section titled “Purpose”The public package published as @saazip/cache-core for embedded library-first adoption.
What it gives you
Section titled “What it gives you”- the main embedded cache API
- remember/get/getWithMetadata primitives with stale-while-revalidate support
- re-exported contracts, domain, and metric helpers
Use this when
Section titled “Use this when”- caching should stay close to the consuming backend instead of becoming a remote service
- you want one stable package boundary for cache behavior
Smallest useful setup
Section titled “Smallest useful setup”import { createCacheCore } from "@saazip/cache-core";
const cache = createCacheCore({ namespace: { service: 'billing-api', domain: 'plans' }, tenantId: "tenant_demo",});
const value = await cache.remember( ['catalog', 'current'], async () => ({ plans: ['starter', 'pro'] }), { tags: ['plans'], ttlSeconds: 60 },);Workspace details
Section titled “Workspace details”- Package name:
@saazip/cache-core - Workspace path:
packages/sdk
Internal dependencies
Section titled “Internal dependencies”External dependencies
Section titled “External dependencies”- None
Usually paired with
Section titled “Usually paired with”@saazip/cache-core-contracts@saazip/cache-core-core@saazip/cache-core-metrics@saazip/cache-core-adapters-redis
You still own
Section titled “You still own”- which reads are cached, how keys are chosen, and when invalidation should happen
- your product-specific tag strategy and cache policy decisions
Scripts
Section titled “Scripts”build:tsc -p tsconfig.jsontypecheck:tsc --noEmit -p tsconfig.jsonlint:biome check src package.json tsconfig.json