Melisa Cache#
Cache#
AutoCacheModels#
CacheManager#
- class CacheManager[source]#
Bases:
object- get_guild(guild_id)[source]#
Get guild from cache
- Parameters:
guild_id (Optional[
Snowflake, str, int]) – ID of guild to get from cache.
- get_guild_channel(channel_id)[source]#
Get guild channel from cache
- Parameters:
channel_id (Optional[
Snowflake, str, int]) – ID of guild channel to get from cache.
- remove_guild(guild_id)[source]#
Remove guild from cache
- Parameters:
guild_id (Optional[
Snowflake, str, int]) – ID of guild to remove from cache.
- remove_guild_channel(channel_id)[source]#
Remove guild channel from cache
- Parameters:
channel_id (Optional[
Snowflake, str, int]) – ID of guild channel to remove from cache.
- set_guild(guild=None)[source]#
Save Guild into cache
- Parameters:
guild (Optional[~melisa.models.guild.Guild]) – Guild to save into cache
- set_guild_channel(channel=None)[source]#
Save Guild into cache
- Parameters:
channel (Optional[~melisa.models.guild.Channel]) – Guild Channel to save into cache
- set_guild_channel_last_message_id(channel_id, guild_id, message_id)[source]#
Set guild channel last message id
- Parameters:
channel_id (Optional[
Snowflake, str, int]) – ID of channel to set.guild_id (Optional[
Snowflake, str, int]) – ID of guild to set.message_id (Optional[
Snowflake, str, int]) – ID of message to set.