3 ms·
Would you use a client where the most popular threads are constantly out of date due to caching? I certainly wouldn't.
by gsk22 3y ago
Would you use a client where the most popular threads are constantly out of date due to caching? I certainly wouldn't.
- noitpmeder 3y agoThis wouldn't really be an issue for there to still be a massive advantage to even a simple caching layer. Imagine one has 10 request for thread {X} every second (probably a massive under estimation of the actual traffic). If you cache that single thread with a lifetime of a second you have instantly cut out 90% of your API usage for that thread. Obviously the final benefit depends on what the actual distribution of {users} per {threads} per {time} -- but if your goal is to shave redundant API requests than it definitely makes sense, especially if the alternative is untenable in terms of cost.
- gsk22 3y agoMy point is that for caching to be cost-effective, it requires long lifetimes -- especially if your # of users is relatively low. Especially for an app like Reddit with millions of subreddits. There is no monolithic "reddit"; the experience is tailored to each user based on the subs they've joined. So your % of requests that will be asking for a cached resource is lower than other high-volume websites. I think your 99-to-1 estimate is _way_ off.