Skip to main content

Module callback_data_cache

Module callback_data_cache 

Source
Expand description

Cache for arbitrary callback-data payloads attached to inline keyboards. Arbitrary callback data cache.

Ported from python-telegram-bot/src/telegram/ext/_callbackdatacache.py.

Stores arbitrary callback data for inline keyboard buttons so that the actual objects (not just short strings) can be passed through the Telegram callback mechanism. Uses a simple LRU eviction strategy bounded by maxsize.

Structs§

CallbackDataCache
A custom cache for storing the callback data of an ExtBot.
InvalidCallbackData
Raised when the received callback data has been tampered with or deleted from cache.

Type Aliases§

CdcData
Persistent representation of the cache state.