4 ms·
Yes you are right. I did not notice it. HTTP cache is effective on resources that are same for all users. One possible solution is to decouple the personalized
by andreas_bak 16y ago
Yes you are right. I did not notice it. HTTP cache is effective on resources that are same for all users.
One possible solution is to decouple the personalized data and load it separately using AJAX. Votes are already implemented in a similar way.
Generally, I am proponent of HTTP caching. It requires some modifications of web sites in order to be effective but still the whole system remains less complicated, compared to implementations of cache on back-end (like `memcached').
For example reddit, which is similar to HN, is in constant struggle with their cache subsystems (http://blog.reddit.com/2010/05/reddits-may-2010-state-of-servers.html http://blog.reddit.com/2010/05/reddits-may-2010-state-of-ser...). I believe it can be avoided by keeping cache and web site code apart.
- smackfu 16y agoI know rails has the concept of caching HTML snippets, so you still have the page construction cost, but you avoid the database calls.