ChatExchange icon indicating copy to clipboard operation
ChatExchange copied to clipboard

Better caching strategy

Open Manishearth opened this issue 11 years ago • 3 comments

We currently cache messages in client https://github.com/Manishearth/ChatExchange/blob/master/chatexchange/client.py#L71

However, these are not updated on edits, and it's cached indefinitely. We should have:

  • [ ] A way to keep these up to date, perhaps by pinging the message object with new values on edits/stars
  • [ ] A way to clean the cache
  • [ ] A way to disable the cache

Manishearth avatar Sep 10 '14 13:09 Manishearth

http://shouldiblamecaching.com

bjb568 avatar Apr 08 '15 22:04 bjb568

+1 for cache control.

Unihedro avatar Apr 09 '15 06:04 Unihedro

Can I ask how the caching currently works?

From what I can see, you're creating a new instance, adding it to the cache, and returning it. At no point are you actually reading from the cache and returning that data. On new message creation, if that message ID exists in this queue, it's not being fetched, nor utilized.

danbopes avatar Oct 30 '18 21:10 danbopes