Ghost/ghost/event-aware-cache-wrapper
Naz f74b19ab61
Added implementation for event-aware cache
refs https://github.com/TryGhost/Toolbox/issues/522

- The main feature of this cache wrapper is being able to "reset" the the cache without calling the "reset" on the wrapped cache. Being able to invalidate caches without accessing the data is a feature needed to run on caches with shared environment.
- Cache invalidation happens through a special "reset time" key being added to each key when setting or getting a value, when the cache is reset the reset time is set to a new value - essentially invalidating all previously accessible values.
2023-02-23 13:07:04 +08:00
..
lib Added implementation for event-aware cache 2023-02-23 13:07:04 +08:00
test Added implementation for event-aware cache 2023-02-23 13:07:04 +08:00
.eslintrc.js Bootstrapped module for EventAwareCacheWrapper 2023-02-23 13:07:04 +08:00
index.js Bootstrapped module for EventAwareCacheWrapper 2023-02-23 13:07:04 +08:00
package.json Bootstrapped module for EventAwareCacheWrapper 2023-02-23 13:07:04 +08:00
README.md Bootstrapped module for EventAwareCacheWrapper 2023-02-23 13:07:04 +08:00

Event Aware Cache Wrapper

Cache wrapper allowing to reset the cache after certain events

Usage

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests