Skip to main content

Module cache

Module cache 

Source
Expand description

Cache module for guild channels.

This module provides caching functionality for guild channels using moka cache. It includes two caches:

The CacheArgs struct is used to retrieve channels from the cache or fetch them from the API if not found.

Structs§

CacheArgs
Arguments for cache operations.

Statics§

GUILD_CHANNEL_CACHE
Cache for individual guild channels, mapping channel IDs to their channel data.
GUILD_CHANNEL_LIST_CACHE
Cache for guild channel lists, mapping guild IDs to their channel lists.

Functions§

channel_cache 🔒
Builds a cache with the shared tuning for both channel caches: 500 entries, TTL 12 hours, TTI 1 hour.