Inaddition, Joomla developers can use caching facilities to store the result of database queries, for example, to increase the responsiveness of the site, but this is outside the scope of Administrator capabilities.
To verify that page caching is working, go to a website page that displays an article. After you display that page you should find in the file system a cache/page directory with a file in it that has a filename like -cache-page-.php. (Joomla has to store separate cache pages for separate URLs so the second string of hex digits is a hash of the URL of the site web page, to make the filename unique to that page).
If your site has a function like a shopping basket, applying page caching will cause problems, as pages have to show what the customer has already selected, rather than displaying a cached page that is common to everyone. However, you can configure the System - Page Cache plugin to exclude caching specified Menu Items or specified URLs and URL ranges (in the Advanced tab), so that only truly static pages are cached.
With Conservative Caching you can cache the View output from components and the output from those Modules that allow caching. But note that this will work only on pages that are not cached using the Page Cache. For those pages the whole web page is cached, and Conservative Caching isn't even considered.
To check it's working, go to your site, ensure that you are logged out, and navigate to a web page that displays an article. Check your file system and you should find a folder cache/com_content containing a cache file.
You'll also find other directories such as cache/com_languages (as displaying the page involves loading the current language, and this will be cached as well) and also directories relating to module cache, e.g. cache/com_modules. These result from the use of cache that developers have coded within the Joomla application.
If you edit and save that article then refresh the site page, you will find that the site displays the updated text this time. This is because whenever the edit is saved, Joomla clears the cache for that article.
However, you can demonstrate that the cache is working if you edit the cache file in the cache/com_content directory using a basic text editor. Using the editor, change one letter within the article text in the cache file and save the file. Then when you refresh the web page you should see the change that you made to the cache file.
How can you select which component views get cached, and under what circumstances? Alas, you can't do this. This is determined by the Joomla core component developers and coded in the component PHP code. The criteria are different for each component. However, you can easily discover what criteria are used because for each of the site components they are coded in the site controller.php file. For example, at the time of this writing (Joomla version 3.9.2) for the Contacts component we find in components/com_contact/controller.php
The expression $user->get('id') is true if this is a logged-in user. This means that articles are never cached for logged-in users. The subsequent expressions relate to other conditions when the caching is not performed, even if the user is not logged in.
In this way you can discover the circumstances under which caching is performed, but changing these is not advisable.You can also demonstrate that modules are being cached by using the Joomla Breadcrumbs module, ensuring it's displayed in some module position on the web page, setting its Caching option and manually editing the cached file in cache/mod_breadcrumbs.
Like Conservative Caching, Progressive Caching also caches the output from component views and from modules. The functional difference between the two is that with Progressive Caching for logged-off users all modules are always cached. In this case, setting the No Caching option for a module has no effect. If the caching storage option is to File, you can find the modules cache file (the output from all modules is stored within the same file) within the cache/com_modules directory.
As regards the conditions for caching of Joomla core component views, there is no difference between conservative and progressive caching. Despite what you may read on some websites and responses to Stack Overflow questions, it is not the case that Conservative Caching relates to when the user is not logged on and Progressive Caching to when the user is logged on.
For cache settings, go to System > Global configuration > System. Here in the options, you will see the Cache Settings. In the System Cache option, there are three types of caches. You have to select the desired one as per the requirements of your website.
Conservative caching is the most standard type of caching. When a visitor visits a page of your website, Joomla checks the cache directory if there is any non-expired version of the page. If found, Joomla will serve it to the visitor. And if there is a non-expired version of the page not available in the cache directory Joomla will create a new cached version of the page and serve to the visitor. And the same cached version will be served to the coming visitors as long as the cached version is not expired. This is the most popular way of Joomla caching and most site owners along with the developers prefer to use conservative caching in their Joomla websites.
If your Joomla website modules have static contents then you can use progressive caching. In progressive caching, when a visitor visits a page of your website Joomla checks in the cache directory to see if there is any non-expired version of the page is available for that specific visitor. If found, it will be served to the visitor, if not, Joomla will create a new cached version of that page and serve to the visitor. But this cached version of that page will not be served to the other visitors. Until it expires, this cached version is for only that specific visitor.
While this is admirable, it has also generated quite some confusion, misconfigurations, poor performance and frustration for many. If you are considering using minification or caching on your site, ensure that you have followed the best practice optimisation methods for layout, images and extension use first, otherwise you may not see the results you were expecting.
Depending on what level of caching you choose to use will determine whether large datasets or highly related content are in sync and make sense to your visitor. With larger datasets or content, there may also be a performance loss if your server or hosting account does not have enough resources or processing power to perform the data caching activity behind the scenes. Subsequently as visitors browse through your site your page load times can actually increase as visitors are always waiting for the cache application to build the cached page before displaying it. Having said this, if your site architecture means that your visitors tend to revisit the same page multiple times within the same session, like central hubs or portal type sites, then caching can produce ideal results and improve load times.
In some cases, simple but effective use of compression or minification extensions can produce better results due to less pressure on available hosting resources, not to forget proper optimisation of image dimensions and file sizes.
If your site tends on the larger side or if dynamic content database queries tend on the larger side, then database query caching and/or OPCode caching might be the better choice over page caching extensions, potentially still making use of compression or minification utilities to reduce static resource loading times too.
So, in short, for those that may not be well versed in server, application, php or Joomla! Performance configuration or tuning, this is a mine-field waiting to explode, not to mention ruining and frustrating your day.
Update: Per brianteeman, 3 April, 2021 :
Disable 'System - Cache' in Plugins.
A tip worth knowing until the Configuration Option to turn OFF caching is fully functional and will disable Page caching.
On Desktop Computer #1, I rearranged the order of the Main Menu items. Had to clear the cache and repeat the process three times before the change finally took effect on the frontend (yes, I cleared the Firefox browser each time).
I then went to Desktop Computer #2, cleared the Firefox cache, and loaded the website. There was no update -- the menu items were still in the previous order. Went into the backend of the website on Computer #2 and the order of the menu items were correct. Closed the backend, cleared Firefox cache, and loaded the website again (frontend). The menu items were then correct. I do not understand this behavior. Is it perhaps some caching functionality at the remote server?
Did you previously have caching enabled, then disabled it when you were making changes, and when you disabled caching in Joomla Global Configuration, did you then go and CLEAR the ALREADY cached items in the com_cache? Even with Joomla Global Configuration caching =off, if there are cache files already built they will be used. Ive reported this before and was told it was by design.
Did you previously have caching enabled (YES),
then disabled it when you were making changes (YES),
and when you disabled caching in Joomla Global Configuration,
did you then go and CLEAR the ALREADY cached items in the com_cache? (YES)
While it would be good to have the current items in the System Cache purged when you turn OFF caching, it is not surprising to me that two separate steps are required. For one thing, it could take several seconds to clear a large cache. That might seem awkard on the Configuration Page when all you are trying to do is set a switch -- unless a Pop-Up would advise that the cache is being cleared. Then, the clearing function would need to advise the Configuration Screen when the clearing has been completed so that the Pop-Up would close. That is a good bit of work and code to avoid one step.
3a8082e126