set method

void set(
  1. String key,
  2. PermissionDecision decision, {
  3. Duration? ttl,
})

Store a decision in the cache with optional custom TTL.

Implementation

void set(String key, PermissionDecision decision, {Duration? ttl}) {
  _entries[key] = _CacheEntry(
    decision: decision,
    expiresAt: DateTime.now().add(ttl ?? defaultTtl),
  );
}