Joomlatwork cache engine configuration PDF Print

You can boost the cache engine by using the 'cache raw' mode in Joomla 1.5. The cache raw mode is a setting whereby no sessions are maintained at the server, meaning no database connections and no entries in the Joomla session database tables. The raw mode will result into a fast cache retrieval and is properly 10x-50x times faster then the raw mode on.

If you are using the raw mode you must take care of the following:

Within Joomla 1.5 there is a so called token setting when you login to prevent spoofing.
In the Joomla without the cache setting this token is calculated on each page request. So spoofing is in this case impossible. With the cache active within the raw mode this token can't be generated because this will result into 'slower' performance (this is the case when raw mode is off). So to bypass the invalid token message the spoofing token is 'faked' within the cache engine. When the cache is bypassed in the raw mode a token key is inserted into the request parameters and thereby faking the token for spoofing. This is the trade off of having a fast response.

Also when you are using the raw cache mode you must take care of the action when a user logins in if you want to disable the cache for the users when they login. The cache engine can handle this by setting these actions into the cache configuration:

In the cache configuration setting you will find the field: “set the bypass cache cookie if the following actions are set”. In this field you will need to set the actions which will result into setting a bypass cache cookie when a users logs in on your site. Standard in Joomla 1.5 this is “task=login” but you can check the HTML code for the actions you can put into. In the HTML code for the login action the following actions are set.:

<input name="option" value="com_user" type="hidden">
<input name="task" value="login" type="hidden">

Normal the task=login is enough to set the bypass cache cookie. But you can extend this with the “|” symbol in the line. For example task=login|option=com_user will only bypass the cache if these 2 actions are set.
The cache engine validates each line and if one line comply to an action the cache is bypassed.

If you are using Virtuemart (!)
If you are using Virtuemart you will need to bypass the cache once the user has put something into the shopping basket. This is also done based on the action that is performed (putting the item into the shopping basket), the action in Virtuemart is func=cartAdd. If this action is made the cache is bypassed on the pages are generated through Joomla. See the screen print above.

The same actions for apply cleaning the bypass cache settings. Once a user logs of from Joomla the bypass cache cookie can normally be cleared. This is done by putting the task=logout (joomla 1.5 settings)


You can also define bypass cache settings on URL level. For example if you want to bypass the cache for Virtuemart in total just put a phrase of the URL into the configuration field: Enter URL parts that may not be cached: for example put in here 'virtuemart' if this is within all the URL's of Virtuemart.

Note: test these settings carefully when applying it to a live website. Problem is mostly that you have online users. To activate these settings make sure that you have no 'active' users. This is because when you activate the raw mode pages are generated for the cache from users that are logged in as well. This could result into 'cached pages' with information related to a logged in user (this is only the representation of the information).