Repository navigation
Add cookie-based cache with expiration - #1529
Conversation
- Quit early on your own username - Drop "commented" for all, without waiting
|
I don't really like this. Feels like abuse of cookies. And cookies are sent with every request, so this will actually slow down requests, right? And the hard limit on cookies is pretty low. I think it would be better to just use a LRU implementation with support for TTL for our caching. What are the benefits of cookies? I only see downsides. Maybe native TTL, but TTL is not that to do ourselves. |
No because they're stored on
13 lines of code to have TTL https://github.com/sindresorhus/refined-github/blob/16eb017f29af3e8358a07f2bf4f091f38ca8f3a3/source/libs/cache.js#L41-L55
? The only downside I see is the low limit |
Was trying to say that TTL is not that hard to do ourselves. Roughly: We just need an entry that contains an object with all the keys and their TTL timestamp as value, and then for every |
|
The issue has been open for a year and that solution never materialized however 😃 The “full names” cache is probably pretty long for many users by now |
|
Alright. I guess this is better than what we have now and I don't have time either to do something better than cookies. I still think we should do it eventually though. |
Fixes #624
Cookies are limited to about 170 entries, which makes it a pretty short cache though