Zend_Cache_Backend_Sqlite和Zend_Cache_Backend_File [英] Zend_Cache_Backend_Sqlite vs Zend_Cache_Backend_File
问题描述
$ b
可能的优点是:
- 文件系统是有序的(只有1文件在缓存文件夹)
- 删除过期的条目应该更快(我的假设,因为zend不需要扫描每个缓存过期日期的内部元数据)$ / b>
可能的缺点:$ b
$ b- 查找要读取的记录(使用zend文件根据文件名检查文件是否存在,并且速度要快一些)。
我试过在网上搜索一下,但似乎没有太多关于此事的讨论。
你怎么看?
在此先感谢。
解决方案我会说,这取决于您的应用程序。
切换不应该很难。只要测试两种情况,看看哪个最适合你。没有基准是客观的,除了你自己的。
衡量公正的表现,Zend_Cache_Backend_Static是最快的。
Currently i'm using Zend_Cache_Backend_File for caching my project (especially responses from external web services). I was wandering if I could find some benefit in migrating the structure to Zend_Cache_Backend_Sqlite.
Possible advantages are:
- File system is well-ordered (only 1 file in cache folder)
- Removing expired entries should be quicker (my assumption, since zend wouldn't need to scan internal-metadatas for expiring date of each cache)
Possible disadvantages:
- Finding record to read (with files zend check if file exists based on filename and should be a bit quicker) in term of speed.
I've tried to search a bit in internet but it seems that there are not a lot of discussion about the matter.
What do you think about it?
Thanks in advance.
解决方案I'd say, it depends on your application.
Switch shouldn't be hard. Just test both cases, and see which is the best for you. No benchmark is objective except your own.
Measuring just performance, Zend_Cache_Backend_Static is the fastest one.
这篇关于Zend_Cache_Backend_Sqlite和Zend_Cache_Backend_File的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!