Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache #287

Open
tucnak opened this issue May 11, 2020 · 1 comment
Open

Cache #287

tucnak opened this issue May 11, 2020 · 1 comment
Assignees

Comments

@tucnak
Copy link
Owner

tucnak commented May 11, 2020

There are multiple places in the bot which could benefit from the use of in-house caching. Namely, (a) inline results, and (b) currently non-existent user context.

// Cache implements a cache store.
type Cache interface {
	Get(kind Item, key, value string) (string, error)
	Put(kind Item, key, value string) error
	Clear(kind Item, key) error
}

It's not yet clear what exact API and fine–tuning controls will be used, but one thing that is absolutely clear is that the store might be chosen depending on the kind of cache item, i.e. inline query results are better stored in a global cache, whereas the state of the user is better kept in-memory within a single instance. Different arrangements could be introduced.

Telegram should implement an in-memory cache, redis, and possibly, GAE memcached.

@tucnak tucnak added this to the v3.0 milestone May 11, 2020
@tucnak tucnak self-assigned this May 11, 2020
@tucnak
Copy link
Owner Author

tucnak commented May 13, 2020

Cache will most likely have to rely on #291.

@demget demget modified the milestones: v3.0, v3.1 Apr 23, 2022
@demget demget modified the milestones: v3.1, v3.X Oct 4, 2022
@demget demget removed this from the v3.X milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants