Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
This topic describes how to configure caching in XperienCentral which is essential for websites that experience high traffic.

It  It enables the website to handle the load created by many page requests by using an intelligent mechanism that returns pages without having to regenerate them completely. The XperienCentral caching module is also tailored to not interfere with visitor interaction and personalization.

...

Caching occurs in the frontend server processes and has links with JSP rendering [D] and the time stamps table [E], As you can see in the image below. A page request [A] from a website visitor goes through some filters [B] and arrives at the caching module [C].


Image RemovedImage Added


The actions inside the caching module [C] can be summarized as follows (see image below):

...

  1. [A] Retrieve the timestamp of the page (or SSI) by performing a query on the Timestamp database. The database is not always queried but instead the timestamps are also cached in the caching module. The timestamp is compared with the date of the file in the cache. If the timestamp is newer then the file is returned [D], otherwise the page has to be rendered.
  2. [B] The page must be regenerated, therefore a request goes from the caching module to the backend servlet in order to render the page. This takes some time and it’s the slowest scenario. After the page has been rendered, it is stored as a file in the cache directory [C] and the page is returned.


Image RemovedImage Added


Back to Top


...

Pages and Server Side Includes

...

This SSI tag will render a Content Overview element with the ID 68647. There are more parameters that describe the element’s context, for example a. Page ID, Content Item ID, web initiative channel ID, and so forth.

An SSI Example: the Poll Element

...

Enabling Caching

  1. To enable caching go to frontend_system_settings  section of the General tab of Setup Tool and ensure that the allow_cache checkbox is selected.
  2. You can test if it works by requesting several pages on the frontend. Verify whether there are subdirectories with numbers created in the cache directory (the default is /work/cache for local installations and /cache for production servers).
  3. If you want to make sure that most pages are generated (and therefore in the cache) before a website goes live you can run the XperienCentral search engine. 

...

You can find most of the caching settings in the  frontend_system_settings   section of the General tab of Setup Tool. The relevant cache options are:

...

To control the cache, navigate to Configure > Server configuration > [Caching]:


Image RemovedImage Added

To update the timestamps, select a time range for the objects you want to update and click [Update timestamps]. This can be done for the various items, so use common sense to clear the cache only for the relevant items.

If you are dealing with a live server with a significant load you have to be a bit more careful with updating the timestamps. For this purpose "soft timestamping" is available. By setting a soft timestamp, a special entry with ID 0 is created in the "sw_object" table. When a visitor requests a page, the timestamp of this page is compared with the "0" object. If the timestamp is older, a request is sent to regenerate the page , but and at the same time the cached version of the page is returned to the visitor, therefore the visitor doesn’t have to wait until the page is generated but instead they will get the cached page. The next vistor visitor will get the regenerated page. To use soft timestamping you have to click the [Update timestamps] button next to "General timestamp".

When you launch a new website, you can initialize the caching module by clicking on the [Update timestamps] button next to the "Initialize caching" label. This will create a timestamp entry for each page.

...

TableDescription

Tsdatabaseentitytimestamp


Used for database detail pages. Timestamps are identified by the "dbid" parameter.

Tsdatabasetimestamp


Used for all databases. Timestamps are identified by the database ID.

Tsdiscussiontimestamp


Used for discussion timestamps. Timetamps are identified by the thread ID.

Tsjellycontenttimestamp


Used for Content Repository items. Timestamps are identified by media repository content ID.

Tsjellyfishtimestamp


Used for an the Content Repository items of a web initiativechannel. Timestamps are identified by web initiative channel ID.

Tsobjecttimestamp


Used for various XperienCentral objects such as pages and page sections. Timestamps are identified by object ID. For pages this is also the ID in the URL of a page, for example
/web/show/id=26111 - 26111 is the object ID for this page.

tstermtimestamp

Used for Content Repository terms. When terms are changed they could influence content overviews so they have their own table. Timestamps are identified by term ID.


Back to Top

Performance Checklist

The following checklist can be used to check the performance variables of a XperienCentral website. Performance


...

Anchor
debugging_the_xperiencentral_cache
debugging_the_xperiencentral_cache
Debugging the XperienCentral Cache


Panel
borderColor#0081C0
titleColor#0081C0

The cache debugging functionality was introduced in XperienCentral version R24.

You can visually inspect the parts of a content item that have been cached. To do so, you must be logged in to the website backend and the permission "Access debugging tools" in the Permission category "System utilities" must be enabled for your user role. To inspect/debug the cache, navigate to the content item you want to inspect on the website frontend and append the parameter ?cachedebug=true to the end of the URL For example:

https://www.gxsoftware.com/en/products.htm?cachedebug-true

The content item will reload and you will see cached content outlined in red. If you hover the mouse over the area, the cache ID for the content will appear in a tooltip. For example:


Image Added

Back to Top


...

Performance Checklist

The following checklist can be used to check the performance variables of a XperienCentral website. Performance involves more than XperienCentral and the caching module so other relevant settings are also taken into account.

...

A: The cache directory is set in the Setup Tool using cache_directory property . The default setting is /cache.in the frontend_system_settings section on the General tab of the Setup Tool.

Q: What happens if the (application) server is restarted? Will the cache be emptied?

...

Q: Is it OK to remove the files from the cache directory or can the cache get corruptcorrupted?

A: No. The proxy will detect whether the file is present on disk. If not it will be regenerated and written to disk again.

...