开发者

The best way of PHP Caching

开发者 https://www.devze.com 2023-01-31 11:05 出处:网络
Currently, I am trying to 开发者_JAVA百科write a software about ecommerce. My data is usually just MySQL queries. For instance language variable results (err_no_cat => No category found)

Currently, I am trying to 开发者_JAVA百科write a software about ecommerce. My data is usually just MySQL queries. For instance language variable results (err_no_cat => No category found)

Which way is the best and simple method to cache like these data in PHP?


apc


use APC if your app is using single server - you can use it as opcode and regular key=>value cache.

use memcached only if you have multiple servers and you need cache to be available to all of them - that's the point of distributed cache.

Remember that APC is about 6 times faster then memcached.


memcache is a pretty common solution. Facebook and some other big names use it. It can be very fast.

http://php.net/manual/en/book.memcache.php

0

精彩评论

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

关注公众号