Skip to content

Prefix cache design may lead to data loss for large numbers of guilds #8

@imnotevelyn

Description

@imnotevelyn

The prefix cache uses TTLCache(maxsize=1000, ttl=3600) in bot/bot.py. If the bot joins more than 1000 guilds, some prefixes may be evicted from cache prematurely, leading to unnecessary database queries and possible performance issues.

Example Files:

  • bot/bot.py (prefix_cache definition and usage)

Recommended Actions:

  • Assess and implement a scalable caching strategy for guild prefixes.
  • Consider using an LRU cache with dynamic sizing or a persistent cache backed by Redis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions