4 ms·
> the distribution is unpredictable so it can be difficult to know what to cache. Reddit's data is shockingly small[0], cache eviction should be a non-issue as
by mbell 8y ago
> the distribution is unpredictable so it can be difficult to know what to cache.
Reddit's data is shockingly small[0], cache eviction should be a non-issue as it would be trivial to keep it all in ram.
[0] https://www.reddit.com/r/datasets/comments/65o7py/updated_reddit_comment_dataset_as_torrents/ https://www.reddit.com/r/datasets/comments/65o7py/updated_re...
- pg_bot 8y agoWhat I'm advocating for is not to cache in RAM but as a file in something like S3. Build the full HTML page for a time period and store it as a blob, serve it to the user and have JS take over on the front end. You can use local storage to cache information on the client's computer and purge that cache after another predetermined time period. This way you are reducing the number of times you are busting the cache unnecessarily since it doesn't matter if you are getting up to the second vs up to the minute updates from reddit.