Skip to content

[REQUEST] Limiting cache #482

@Toricane

Description

@Toricane

What is the feature you're proposing?
As of right now, caching has no limit.
I feel like there should be a way to set a limit for each type of cache, preferably in the Client instance.

Something like:

bot = interactions.Client(
    ...,
    cache_limits=interactions.CacheLimits(
        messages=100,
        guilds=50,
        ...
    )
)

This is the best thing that I can think of off the top of my head.
Another way is to do what dis-snek did do something with kwargs and have something like this:

bot = interactions.Client(
    ...,
    message_cache=100,
    guild_cache=50,
    ...
)

Additional Information

  • My feature request is related to an existing Issue.
    • Issue (if referenceable):

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions