开发者

What kind of caching machanism is used over at Wikipedia?

If you open up your mozilla Firefox web browser and turn on firebug to check for incoming and outcoming network traffic, you see that, when you look at Wikipedia articles, the amount of cached content is very large.

Unless the article in question has many pictures, most of the content comes from the cache.

I'd like to know whether开发者_StackOverflow中文版 that is done by the browser itself or if it's some underlying PHP Caching mechanism. (is that what they call memcache?APC?) It works very well so I'd like to know how they do it.


Memcacahe, APC etc are server side data stores. You basically use it as a key value store so you don't have to ping your database all the time.

However, what you're actually seeing is a site being loaded on a primed cache. This is the technique of telling your web server to let the browser know that your commonly used resources haven't changed since the last time you viewed it. This effect is achieved by setting far future headers so that the browser doesn't keep requesting the resources. A lot of sites use this technique, including SO.

Here's a great source to read up on, if you want more info : http://developer.yahoo.com/performance/rules.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜