plugins/lru/lru_hook library

Functions

lruInitHook({String uid = 'lru:init', List<String> events = const ['write', 'put'], String metaKey = 'meta', String lastAccessedKey = 'last_accessed', String accessCountKey = 'access_count', int nowProvider()?, HiPhase phase = HiPhase.post, int priority = 0}) → HiHook
Creates an LRU initialization hook for new entries.
lruTouchHook({String uid = 'lru:touch', List<String> events = const ['read', 'get'], String metaKey = 'meta', String lastAccessedKey = 'last_accessed', String accessCountKey = 'access_count', bool trackAccessCount = false, int nowProvider()?, HiPhase phase = HiPhase.post, int priority = 0}) → HiHook
Creates an LRU touch hook that updates access metadata on read.