简体   繁体   English

Codeigniter缓存网页与数据库。 什么是尊敬?

[英]Codeigniter caching web-page vs database. What is the Deference?

Now I just starting using codeigniter as framework. 现在,我刚刚开始使用codeigniter作为框架。 I have a lot of data will be saved on database. 我有很多数据将被保存在数据库中。 I read more on caching system of codeigniter. 我阅读了有关codeigniter缓存系统的更多信息。 And I found that there is two types of caching on it DATABASE CACHING & WEB PAGE CACHING. 而且我发现数据库缓存和网页缓存有两种缓存类型。 My Question here is, When must I use database caching ? 我的问题是,什么时候必须使用数据库缓存? And when must I use web-page caching? 何时必须使用网页缓存?

Let me put a quote from the docs , 让我引用一下文档

Unfortunately there is no single answer to the question of whether you should cache your database. 不幸的是,对于是否应该缓存数据库没有唯一的答案。 It really depends on your situation. 这真的取决于您的情况。

That also aligns with my suggestion to you. 这也符合我对你的建议。 Look at both, Database Caching and Web Page Caching as two mechanisms on your disposal when there's a specific performance problem to solve . 需要解决特定的性能问题时,将数据库缓存和网页缓存这两种机制都可以使用 Then consider them both, how they fit in and base your pick on that. 然后考虑它们两者,它们如何适合并以此为基础进行选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM