plugins/ttl/ttl_hook library

Functions

ttlCleanupHook({String uid = 'ttl:cleanup', List<String> events = const ['read'], HiCond? condition, HiPhase phase = HiPhase.main, int priority = 0}) → HiHook
Creates a TTL cleanup hook that returns HiDelete for expired entries.
ttlStampHook({String uid = 'ttl:stamp', List<String> events = const ['write', 'put'], String metaKey = 'meta', String createdAtKey = 'created_at', int nowProvider()?, HiPhase phase = HiPhase.post, int priority = 0}) → HiHook
Creates a TTL stamp hook that sets creation timestamp on write.