用PHP缓存? [英] Caching in PHP?

查看:54
本文介绍了用PHP缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们运行了许多用PHP编写的Web应用程序.不幸的是,这些查询中有一些带有大量连接的选择查询,这些查询导致MySQL的响应速度变慢.

We run a number of web applications written in PHP. Unfortunately there are some select queries within these with some pretty hefty joins which are causing MySQL to become less responsive.

因此,我们正在研究缓存一些常规使用的联接.我研究了Zend_Cache,它看起来很有前途,是否还有其他更好的选择?

Because of this we are looking into caching some of the regularly used joins. I have looked into Zend_Cache which looks promising, are there any other alternatives that may perform better?

还有什么是缓存的最佳后端?我相信Zend_Cache提供基于文件的Sqlite和Memcached.

Also what is the best back end for a cache? I believe Zend_Cache offers file based, Sqlite and Memcached.

推荐答案

当速度很重要时,您绝对应该使用memcached.但是在大多数情况下,文件缓存或sqlite缓存可以满足您的需求.

When speed is important you should definitely go for memcached. But in most cases a filecache or sqlite cache serves your needs.

Zend_Cache是​​一个非常好的缓存库,它通过其适配器系统支持多种缓存机制,这一事实使得稍后更改缓存解决方案变得轻而易举,因此我肯定会选择Zend_Cache.

Zend_Cache is a very good Caching library, the fact that it support numerous caching mechanisms through it's adapter system makes changing caching solutions lateron a breeze, so I would definitely go for Zend_Cache.

这篇关于用PHP缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆