PVCacheHook constructor

PVCacheHook({
  1. String? eventString,
  2. required EventFlow eventFlow,
  3. int priority = 0,
  4. List<ActionType> actionTypes = const [ActionType.put, ActionType.get, ActionType.delete, ActionType.clear, ActionType.exists],
  5. required Future<void> hookFunction(
    1. PVCtx ctx
    ),
})

Creates a new cache hook.

eventFlow and hookFunction are required. All other parameters are optional.

Implementation

PVCacheHook({
  this.eventString,
  required this.eventFlow,
  this.priority = 0,
  this.actionTypes = const [
    ActionType.put,
    ActionType.get,
    ActionType.delete,
    ActionType.clear,
    ActionType.exists,
  ],
  required this.hookFunction,
});