Permissions and LRUCache
Permissions
Import fromtalos-fluxer or talos-fluxer/permissions.
new Permissions(value?) accepts a bigint, decimal string, safe non-negative
integer, or another Permissions. The default mask is zero. Masks must fit an
unsigned 64-bit value. See the source.
add() and remove() do not mutate the original. Avoid JavaScript bitwise
operations on numbers: permission masks exceed 32 bits. Combine the bigint
flags instead:
See channel permission checks for the
data you need and the policies a mask alone does not cover.
LRUCache
Import fromtalos-fluxer. Construct
new LRUCache<K, V>(maxSize?, ttlMs?). A standalone cache defaults to 100 entries
and no expiration. Client resource caches use their own defaults: disabled
capacity and a five-minute TTL. See the source.
Expiration starts on
set(). Reading an entry changes recency but does not
extend its TTL. There is no background expiration timer. This generic class does
not clone or freeze values; resource wrappers create their own frozen snapshots.