@lemonstand.org/request-caching
v1.0.1
Published
cache similar requests
Downloads
1
Keywords
Readme
request cache
Cache similar requests in order to regulate outbound traffic.
Usage
- Encapsulate each of the requests you want cached in a single class
implementing
IAsyncRequest
. - Instantiate an instance of
IAsyncCache
. An implementation making use of DynamoDB is included in this repo asTableCache
. - An instance of your request class and cache should be used to create an
AsyncCachedRequest
object. All requests should now be done though thisAsyncCachedRequest
object so that all requests are gated by a cache.