Hacker News new | ask | show | jobs
by bartl 5262 days ago
Is that demo code for the caching system not broken? It looks to me like, if the cache gets rebuilt, the output is only sent to the file, and there's no output sent to the browser. I can't test that right now, and there are a few functions there I've never used, but that is what it looks like.

Also: I don't like system that just check for the age of the cache, and not a more elaborate system that, using a single simple DB query, checks if the input data has changed, before regenerating the file. That looks way more useful to me. But, of course, you have to hand code that query for each page.

1 comments

The easy and Right way to add caching is to stick something like Varnish in front. It can also handle load-balancing, which is nice.