問題描述
我閱讀了這篇文章:http://www.mysqlperformanceblog.com/2006/09/27/apc-or-memcached/ 從很久以前開始......我想獲得最好的緩存引擎,以便我的應用程序非常快.當然,我不想過度緩存,但我想至少選擇最好的東西.在那篇文章中它說 Memcached 很慢而 apc 很快,那么為什么每個人都選擇 memcached?>
http://framework.zend.com/manual/en/zend.cache.backends.html#zend.cache.backends.twolevels 這里說的是使用一個快速的(但有限制的)像 Apc、Memcache ......像File,Sqlite……"你覺得用Apc做快,Memcache做慢是個好主意嗎?
Memcached 是分布式緩存系統,而 APC 是非分布式的——主要是操作碼緩存.
如果(且僅當)您的 Web 應用程序必須運行在不同的 Web 服務器上(負載平衡),則必須使用 memcache 進行分布式緩存.如果沒有,請堅持使用 APC 及其緩存.
您應該始終使用操作碼緩存,即 APC(APC 也會集成到 php6 iirc 中,所以為什么不現在開始使用它).
您可以/應該將兩者用于不同的目的.
I read this article: http://www.mysqlperformanceblog.com/2006/09/27/apc-or-memcached/ from way back when.. I want to get the best caching engine available so that my application is really fast. Of course I don't want to over-cache but I want to at least choose the best thing out there. In that article it says Memcached is slow and apc is fast so why is everyone choosing memcached?
http://framework.zend.com/manual/en/zend.cache.backends.html#zend.cache.backends.twolevels here is says "use a fast one (but limited) like Apc, Memcache... and a "slow" one like File, Sqlite..." do you think using Apc as the fast and Memcache as the slow is a good idea?
Memcached is a distributed caching system, whereas APC is non-distributed - and mainly an opcode cache.
If (and only if) you have a web application which has to live on different webservers (loadbalancing), you have to use memcache for distributed caching. If not, just stick to APC and its cache.
You should always use an opcode cache, which APC is (also APC will get integrated into php6 iirc, so why not start using it now).
You can/should use both for different purposes.
這篇關于Memcached 與 APC 我應該選擇哪一個?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!