-
Notifications
You must be signed in to change notification settings - Fork 1
Features
Flush: writes all edited cache slots to backing-store and sets them as out-of-date. This should not be used asynchronously with gets and sets because flush operation first waits for all get/set operations to complete and then starts (asynchronously) iterating all cache slots. Any concurrent get/set operation added after the flush call may or may not increase the flush completion time and is not guaranteed to be included in the flushing operation.
Set: Asynchronously writes a value to cache and cache decides where to keep the data (RAM or backing-store).
Get: Asynchronously reads a value from cache. If value is not in cache, reads it from backing-store and starts caching asynchronously.
Set Multiple: Sets multiple values to multiple keys asynchronously to each other.
Get Multiple: Gets multiple values from multiple keys asynchronously to each other.
Get Multiple Awaitable: Returns a Promise that is complete once the get operations are complete.
Set Multiple Awaitable: Returns a Promise that is complete once the set operations are complete.
Get Awaitable: Returns a Promise that is complete once the get operation is complete.
Set Awaitable: Returns a Promise that is complete once the set operation is complete.
All get and set methods return the values they were given (or found) from callbacks to the caller.