@groupby/elements-cache-driver-plugin
v0.2.0
Published
This package contains the GroupBy Elements Cache Driver Plugin class.
Downloads
5
Maintainers
Keywords
Readme
GroupBy Elements Cache Plugin
This package contains the GroupBy Elements Cache Driver Plugin class.
Usage
To use the plugin, simply instantiate it and register it with Core:
const cacheDriverPlugin = new CacheDriverPlugin();
core.register(cacheDriverPlugin);
Events
This plugin listens for and dispatches a number of events. These events are defined in the @groupby/elements-events
package.
Received
CACHE_REQUEST
: When received, a request to the cache is made and a response is dispatched with the event name provided in the payload ofCACHE_REQUEST
. It is recommended to prefix the return event name with the value ofCACHE_RESPONSE_PREFIX
.
Dispatched
- A cache response event: Dispatched when a
CACHE_REQUEST
is fulfilled. The event is dispatched under the name provided by the correspondingCACHE_REQUEST
payload.