1.0.1 • Published 3 years ago

@lemonstand.org/request-caching v1.0.1

Weekly downloads
-
License
UNLICENSED
Repository
gitlab
Last release
3 years ago

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.