@lemonstand.org/request-caching

cache similar requests

Usage no npm install needed!

<script type="module">
  import lemonstandOrgRequestCaching from 'https://cdn.skypack.dev/@lemonstand.org/request-caching';
</script>

README

request cache

Cache similar requests in order to regulate outbound traffic.

Usage

  1. Encapsulate each of the requests you want cached in a single class implementing IAsyncRequest.
  2. Instantiate an instance of IAsyncCache. An implementation making use of DynamoDB is included in this repo as TableCache.
  3. An instance of your request class and cache should be used to create an AsyncCachedRequest object. All requests should now be done though this AsyncCachedRequest object so that all requests are gated by a cache.