Skip to content

Commit

Permalink
Publishing KB Article #124
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Aug 24, 2016
1 parent 5355072 commit 1ec311a
Showing 1 changed file with 17 additions and 0 deletions.
@@ -0,0 +1,17 @@
---
title: How can I show dynamic content while caching the page?
categories: questions
tags: uri-exclusion-patterns
author: renzms
github-issue: https://github.com/websharks/comet-cache-kb/issues/124
---

Comet Cache is a page caching plugin. That means it captures the output from the server and saves it to a cache file. When the next person comes along, Comet Cache serves the cached file instead of expending server resources by having the page reprocessed.

If you have a widget or a plugin that shows some dynamic content on a page that is being cached (e.g., a Page View Counter widget on the Home Page), what will happen is that Comet Cache will cache the output from the page and serve that cached file to future visitors--the dynamic portion will no longer be dynamic.

There are two ways around this problem:

1. Make sure that your dynamic plugin or widget is using JavaScript to dynamically update itself, using something like an AJAX call to the server. If JavaScript is used to update the dynamic content (a counter, for example), then even when the dynamic content is cached it will continue to update as expected.

2. Exclude the page with the dynamic content from being cached by Comet Cache. This can be done using the **URI Exclusion Patterns** feature.

0 comments on commit 1ec311a

Please sign in to comment.