You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
intents:createCache.minimal(), .production(), .secure() and .io() now throw ConfigurationError at construction for any option they do not apply. encryption, masterKey, previousMasterKeys or tenantId on minimal or production throws: use createCache.secure(), createCache.io() with encryption, or createCache() with encryption. encryption on secure throws: pass masterKey, previousMasterKeys and tenantId at the top level. masterKey, previousMasterKeys or tenantId at the top level of io throws: nest them under encryption. backend, url and keyPrefix on io, metrics and reliability on minimal, stampede on any preset, keyPrefix beside a backend instance, and misspelt options such as defaultTtl also throw. An option set to undefined is still accepted. On every encrypted cache, and in new EncryptionManager(…), a tenantId that is set but is not a string, such as null, throws ConfigurationError.
encryption: bind the backend keyPrefix in the AES-GCM AAD (LAB-6396) (#208)
l1:L1Cache and createCache (via its l1 option) now reject an l1.maxMemory of Infinity, NaN, 0 or a negative number, throwing ConfigurationError. A caller who passed Infinity for "no memory bound" should pass Number.MAX_SAFE_INTEGER; maxEntries remains the hard bound on L1's size. Every l1 field set to undefined or null now takes its default instead of replacing it.
serialization:MessagePackSerializer (and createCache via its serializer option) now rejects maxEncodedSize, maxDecodedSize or maxCollectionSize set to undefined, NaN, Infinity, 0, a negative number or a non-integer, throwing ConfigurationError. A caller who passed Infinity for "no limit" should pass Number.MAX_SAFE_INTEGER.
serialization: serializer.maxDepth must now be an integer from 32 to 1024. Any other value, including NaN, Infinity or an explicit undefined, throws ConfigurationError when the cache is created. Previously, values below 32 were honoured, and NaN or undefined silently disabled the depth check.
interop: an interop namespace or operation containing .. now throws ConfigurationError at wrap time, on every backend; the exported generateInteropKey throws it at call time. Rename the segment; its keys become a full cache miss.
invalidation:L1Config.invalidationEnabled is removed from the exported L1Config interface and from DEFAULT_L1_CONFIG, and the intent presets no longer set it. Nothing read the field. TypeScript consumers that set invalidationEnabled will get a compile error and should delete the property. Runtime behavior does not change. Separately, invalidate('params') without a key now stops before any L1 mutation, backend.delete, or invalidation publish, logs once and resolves; it previously resolved silently and still published a params event with no hash.
interop:ns and nsapi are reserved interop namespaces. cache.wrap, generateInteropKey and validateInteropSegment throw ConfigurationError for them, and for non-string namespace or operation segments. Deployments that used ns or nsapi as an interop namespace on non-CachekitIO backends must rename the namespace. The rename makes every existing entry in that namespace a cache miss.
encryption: a secure cache created without a tenantId now binds tenant "default" into the AES-GCM AAD instead of "". That is the value HKDF already derived its key from and the value the protocol requires, so a tenant-less cachekit-ts secure cache now shares ciphertext with cachekit-py and cachekit-rs on tenant "default". Caches with an explicit tenantId are unaffected. Entries written by a tenant-less secure cache on @cachekit-io/cachekit 0.1.5 or earlier no longer authenticate, so every read of one fails decryption. To migrate, delete those entries (or switch to a fresh namespace or key prefix) once no pre-upgrade instance is still writing; during a rolling upgrade, old and new instances cannot read each other's entries. Do not wait out the TTL instead. Under the secure preset's default settings, each undecryptable read returns a miss; it is not retried and does not count as a circuit-breaker failure.
cache: secure.wrap() fails closed when encryption is not configured (LAB-513) (#123)
Features
cachekit: User-Agent, per-runtime probes and a live dev harness (LAB-7059) (#195) (a35bdd7)
retry: add retry.deadline, one budget in ms shared by all attempts of an operation; the production, secure and io presets set it to 5000 (LAB-7080) (#200) (f978bbe)
Bug Fixes
cache: bound envelope unpack by maxDecodedSize (LAB-2732) (#141) (898d37d)
cache: decode a decrypted plaintext as plain MessagePack, never a sniffed envelope (LAB-8182) (#213) (7be7f40)
cache: decode after run('get') so decode failures are not retried or counted by the breaker (LAB-7079) (#175) (3b646f6)
cachekitio: default to a 5 s per-attempt timeout inside one shared retry deadline (LAB-7080) (#200) (f978bbe)
cachekitio: DELETE never reports existence, so a 404 throws (LAB-5580) (#178) (6499bd8)
cachekitio: honour X-CacheKit-Freshness and Fresh-For before backfilling L1 (LAB-7883) (#206) (985df71)
cachekitio: never follow redirects; tighten API URL validation and send the URL as parsed (LAB-8208) (#216) (6af4b80)