在joomla 2.5中,保守缓存和渐进缓存有什么区别? [英] What is difference between conservative caching and progressive caching in joomla 2.5?

查看:105
本文介绍了在joomla 2.5中,保守缓存和渐进缓存有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在joomla的Global Config中,有2个缓存是保守的和渐进的,两者有什么区别?

解决方案

保守性缓存是标准的缓存类型.运作方式如下:

  • 访问者访问您网站上的页面.

  • Joomla检查其缓存目录中是否存在该页面的未过期版本.

  • 如果缓存的页面存在(并且尚未过期),则Joomla将其提供给访问者–否则,将创建页面的缓存版本,并且该缓存的版本将被提供给访问者以及其他所有访问者随后的访问者,只要它(即它"是指页面)没有过期即可.

以上场景是典型的情况,是大多数开发人员实施的方式 缓存.

渐进式缓存的工作方式如下:

  • 访问者访问您网站上的页面.

  • Joomla检查该访问者是否存在该页面的缓存版本,并且尚未过期.

  • 如果该缓存页面存在,则将其提供给访问者,否则,Joomla将为该特定访问者创建缓存页面,然后将其提供给他.

  • 如果另一个访问者(从未访问过该页面)访问该页面,则Joomla将不会投放前一个访问者的缓存页面,而是会创建该页面的缓存版本.
    专门针对该用户,然后将其提供给他.

如您所见,渐进式缓存只能提供性能 如果同一位访问者访问了该页面中的同一页面,则会有所改善 页面的缓存版本的生存期.在大多数情况下, 渐进式缓存导致巨大的性能损失,远远没有达到 比禁用缓存更糟糕,因为几乎每次访问 Joomla必须处理请求,创建 页面,然后将页面提供给访问者(而不是 在以下情况下处理请求并提供页面 缓存已禁用).哦,别忘了所有的缓存文件 由Joomla生成-您只能想象您有多少个这些文件 如果您的网站访问量很大,将在您的缓存文件夹中 (页面很多).

现在您可能想知道,在什么情况下是渐进式缓存 有用?好吧,假设您有一个视频网站(类似于 YouTube).您要显示每个访问者基于其定制的页面 位置和/或浏览器设置和/或已安装的插件.因此对于 访问者加载的每个页面,您都可以使用此信息来 生成该页面的自定义版本,然后将其缓存.如果 访客再次访问同一页面,则Joomla无需重做 生成自定义页面的工作.

当然,在许多情况下,渐进式缓存是 确实很有用,但我们认为渐进式缓存仅应 考虑网站是否吸引了很多访问者,以及这些访问者 主要是回头客.在其他情况下使用它会导致 对该网站的性能造成重大影响.

摘录自此处. /p>

In Global Config in joomla have 2 caching is conservative and progressive, what is difference both ?

解决方案

Conservative caching is the standard type of caching. Here’s how it works:

  • A visitor visits a page on your website.

  • Joomla checks if there is a non-expired version of that page in its cache directory.

  • If the cached page exists (and it’s not expired), then Joomla will serve it to the visitor – otherwise, a cached version of the page is created, and that cached version will be served to the visitor, and to every other consequent visitor, as long as it’s (by "it" we mean the page) not expired.

The above scenario is typical and is how most developers implement caching.

Progressive caching works the following way:

  • A visitor visits a page on your website.

  • Joomla checks if a cached version of that page exists for that visitor and it’s not yet expired.

  • If that cached page exists, then it’ll be served to the visitor, otherwise, Joomla will create the cached page for that specific visitor and then will serve it to him.

  • If another visitor (who has never been on that page) visits that page, then Joomla will not serve the cached page of the previous visitor, instead, it will create a cached version of that page
    specifically for that user, and then serves it to him.

As you can see, progressive caching only offers a performance improvement if the same visitor visits the same page within the lifetime of the cached version of the page. In most scenarios, progressive caching results in a huge performance hit that is far worse than disabling cache, simply because for nearly every visit, Joomla has to process the request, create the cached version of the page, and then serve the page to the visitor (instead of just processing the request and serving the page in the scenario where cache is disabled). Oh, and don’t forget about all the cache files generated by Joomla – you can only imagine how many of these files you will have in your cache folder if you have a high traffic news website (that has many pages).

Now you might wonder, under which circumstances is progressive caching useful? Well, imagine that you have a video website (similar to youtube). You want to show each visitor customized pages based on his location and/or browser settings and/or plugins installed. So, for every page that the visitors loads, you use this information to generate a customized version of that page and you cache it. If the visitor visits that same page again, then Joomla doesn’t need to redo the work to generate the customized page.

Of course, there are many scenarios under which progressive caching is really useful, but in our opinion, progressive caching should only be considered if the website receives many visitors and if those visitors are mostly repeat visitors. Using it in other cases will cause a significant hit on the website’s performance.

Extracted from here.

这篇关于在joomla 2.5中,保守缓存和渐进缓存有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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