ofirgeller / cache-ms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use:

Install dependencies with 'yarn' if not running inside the dev container Run e2e tests with 'yarn test:e2e', tests are basic but important to make sure the actual API is useful Run unit tests with 'yarn test'. these tests go deeper into the correctnes of the LRU. Start the server in production with 'yarn start' or for development with 'yarn dev'

TODO:

  1. ship!
  2. add support for ttl on top of lru
  3. add locking to make lru cache thread safe
  4. add the ability to use async getter functions when calling getOrSet (cache calls getter, if the return value is a promise it is awaited)
  5. replace the linked list with a cache oblivious data structure to improve performance

DONE:

  1. build an in memory lru cache.
  2. expose cache interface via http

About


Languages

Language:TypeScript 87.0%Language:Dockerfile 6.9%Language:JavaScript 6.1%