Skip to content

Releases: epicweb-dev/cachified

v3.5.0

13 May 17:45
d55f1ac
Compare
Choose a tag to compare

3.5.0 (2023-05-13)

Features

  • add catch-all "done" event (d55f1ac)
  • Reporters: add mergeReporters helper (ed0f2f1)

v3.4.1

03 May 23:36
7885dc9
Compare
Choose a tag to compare

3.4.1 (2023-05-03)

Bug Fixes

  • actually expose softPurge helper 😅 (7885dc9)

v3.4.0

03 May 20:41
ffdfa7f
Compare
Choose a tag to compare

3.4.0 (2023-05-03)

Features

  • add softPurge helper (ffdfa7f)
  • add swr alias for staleWhileRevalidate option (c7f1bab)
  • expose createCacheEntry and createCacheMetaData helpers (6c05538)

v3.3.1

15 Apr 23:32
3f67a5b
Compare
Choose a tag to compare

3.3.1 (2023-04-15)

Bug Fixes

  • require zod input type from getFreshValue (3f67a5b)

v3.3.0

15 Apr 23:16
fe0f6c7
Compare
Choose a tag to compare

3.3.0 (2023-04-15)

Features

  • support zod schemas on checkValue (06f99aa)
    • also attach cause on thrown validation errors
    • deprecate CheckFreshValueErrorEvent in favor of CheckFreshValueErrorObjEvent
    • deprecate CheckCachedValueErrorEvent in favor of CheckCachedValueErrorObjEvent
    • support on-the-fly migrations where the cached value will not be updated with migrate(newValue, false)
  • take type from schema instead of getFreshValue when using zod transformer (18aba3b)

v3.2.0

14 Apr 20:21
d26a83d
Compare
Choose a tag to compare

3.2.0 (2023-04-14)

Bug Fixes

  • do not execute getValues callback of batch when all values are cached (d26a83d)

Features

  • support fine-tuning metadata in batch requests (9ee69b0) (ref #43)

v3.1.0

25 Jan 07:51
9c53976
Compare
Choose a tag to compare

3.1.0 (2023-01-25)

Features

  • introduce GetFreshValueContext (9c53976)

v3.0.2

24 Jan 09:47
e0d517f
Compare
Choose a tag to compare

3.0.2 (2023-01-24)

Bug Fixes

  • expose esm build as .mjs file (e0d517f)

v3.0.1

14 Dec 20:42
58f0602
Compare
Choose a tag to compare

3.0.1 (2022-12-14)

Bug Fixes

  • redis 4 adapter: ceil EXAT value (#18 - 58f0602)

    in order to fix ERR value is not an integer or out of range

    fixes #17

    Contributed by @TapaiBalazs

v3.0.0

24 Oct 11:15
ee13f13
Compare
Choose a tag to compare

3.0.0 (2022-10-24)

Bug Fixes

  • caches work on unknown data types (c3603b1)
  • rename swv to swr on CacheMetadata (b0558a5)

BREAKING CHANGES

  • CacheMetadata.swv has been renamed to CacheMetadata.swr
    for the most part this will be handled by the library
    (existing cache entries with swv will continue to work, only new ones will use swr)

    Migration:
    When you worked with CacheMetadata (for example in a custom cache adapter)
    you need to adapt your code to:

    1. write swr instead of swv
      👍 new: const metadata: CacheMetadata = { swr: 1000, /* ... */ }
      ⛔️ old: const metadata: CacheMetadata = { swv: 1000, /* ... */ }
    2. read using the staleWhileRevalidate helper
      👍 new: const staleMs = staleWhileRevalidate(metadata)
      ⛔️ old: const staleMs = metadata.swv
  • The Cache type is not generic anymore and always uses unknown for values
    You might need to adjust your cache implementations and caches to now work on
    unknown data types. Typescript should inform you where.
    Nothing to be done when you only used the build-in cache adapters.