New Spark Media Platform Help

Working with cache

Caching stores data for future request so that the site will load quicker. In Media Factory, you can control whether a page is cached or not.

Note: Depending on your browser, you may want to clear the cache after you update a template so that the template changes appear on the website pages.

To control caching:

  1. In the Navigation bar, select Applications>Applications.
  2. On the Applications page, s elect an application.
  3. Under Sections, click Application templates.
  4. On the Application Templates page, click a template.
  5. In the upper right corner, click the Info button.
  6. From the Caching drop-down list, select an option.

  1. Click Save .

Turning Off Caching for CSS Stylesheets

Caching CSS stylesheets will improve performance; however, it will lag the display of the CSS changes made in the template on your website.

In the default wrapper template, around line 43, there is a template variable {$htmlheaders}. This variable renders out the following:

<script type=“text/javascript”>var selectedVHost = yourVHOST#; var sessionCookieName = 'SABRE_ID';</script> <link rel=“stylesheet” type=“text/css” href=”/services/cssloader?id=yourGlobalCSSTemplateID” />

To turn off caching for CSS stylesheets:

  1. Copy what the variable prints out for your application.
  2. Paste it into your default wrapper template just under the: {$htmlheaders}.  
  3. Comment out the {$htmlheaders} variable.  
  4. To the code you just pasted under the {$htmlheaders} variable, add a '&refresh=true' after the cssloader template ID.

You will have something like this:

<!– {$htmlheaders} –> <script type=“text/javascript”>var selectedVHost = yourVHOST#; var sessionCookieName = 'SABRE_ID';</script> <link rel=“stylesheet” type=“text/css” href=”/services/cssloader?id=yourGlobalCSSTemplateID&refresh=true” />

0 comments

Be the first to comment on Working with cache.

Add a Comment

  • captcha