-
Notifications
You must be signed in to change notification settings - Fork 17
Frequently Asked Questions
- Why is my cache directory empty?
- Why doesn't Quick Cache eliminate render-blocking JavaScript and CSS in above-the-fold content?
- How can I show dynamic content while caching the page?
- How can I exclude the Home Page from being cached?
If your cache directory is empty, it could mean that Quick Cache isn't enabled (see Dashboard -> Quick Cache -> Enable/Disable) or that there is an error occurring behind the scenes that is preventing Quick Cache from operating normally.
If Quick Cache is running properly, then an empty cache directory could indicate that Quick Cache has not generated any cache files. Quick Cache will generate cache files when the plugin is active and a visitor visits your site while not logged in (unless you have Caching for Logged-In Users enabled--Pro version only).
An empty cache directory could also mean that all of the cache files passed their expiration date (see Dashboard -> Quick Cache -> Directory / Expiration Time) or that Quick Cache recently cleared the entire cache automatically.
There are a number of reasons why Quick Cache might clear the entire cache directory automatically:
- You upgraded Quick Cache
- You restored the Quick Cache default settings
- You changed the WordPress theme
- You changed navigation menus
- You changed Links (you may or may not have the Links SubPanel on your site)
- You made changes to terms, e.g., Categories or Tags
Quick Cache automatically clears the cache when these events take place because not doing so would likely yield unexpected results. For example, if you modified your navigation menu and Quick Cache didn't clear the entire cache, visitors would be served cache files that included the old menu. Or if you changed your WordPress theme and didn't clear the cache, the old cache files would include the markup for the old theme. And so on.
See Disabling Automatic Clear / Wipe Cache Routines
See Why doesn’t Comet Cache “Eliminate Render Blocking” and move CSS/JS scripts into the footer?
Quick 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, Quick 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 (a Page View Counter widget on the Home Page, for example), what will happen is that Quick 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:
-
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.
-
Exclude the page with the dynamic content from being cached by Quick Cache. With Quick Cache Pro this can be done using the URI Exclusion Patterns feature. With Quick Cache Lite, you will need to write some PHP code in your
wp-config.php
file to dynamically detect the page with the dynamic content and then setdefine(QUICK_CACHE_ALLOWED, FALSE);
to prevent Quick Cache from caching that particular page.
Please see Issue #191.