Q: Is there a free version I can experiment with?

Yes, Comet Cache Lite (the free version) is available at WordPress.org (click here to download ). We also invite you to register free so you'll have an account here at CometCache.com. You may then upgrade to Comet Cache Pro at any time you like. Tip: there is a Pro Preview in the lite version. It will give you a GREAT idea of what to expect. See also: Installation Instructions.


Q: What version of PHP is required to run Comet Cache?

In addition to basic WordPress Requirements, Comet Cache requires the following minimum versions:

  • PHP 5.4+
  • Apache 2.1+ (or any Nginx version)

This applies to both Comet Cache Lite and Comet Cache Pro.


Q: How do I know Comet Cache is working?

First of all, make sure that you've enabled Comet Cache. After you activate the plugin, go to the Comet Cache options panel and enable it, then scroll to the bottom and click Save All Changes. All of the other options on that page are already pre-configured for typical usage. Skip them all for now. You can go back through all of them later and fine-tune things the way you like them.

Once Comet Cache has been enabled, you'll need to log out (and/or clear browser cookies). Cache files are not served to visitors who are logged in, and that includes you. Cache files are not served to recent commenters either. If you've commented (or replied to a comment lately), please clear your browser cookies before testing.

To verify that Comet Cache is working, navigate your site like a normal visitor would. Right-click on any page (choose View Source), then scroll to the very bottom of the document. At the bottom, you'll find comments that show Comet Cache stats and information. You should also notice that page-to-page navigation is lightning fast compared to what you experienced prior to installing Comet Cache.


Q: What is the downside to running Comet Cache?

There's not one! Comet Cache is a must have plugin, for every WordPress powered site. In fact, we really can't think of any site running WordPress that would want to be without it. To put it another way, the WordPress software itself comes with a built-in action reference for an advanced-cache.php file, because WordPress developers realize the importance of such as plugin. The /wp-content/advanced-cache.php file is named as such, because the WordPress developers expect it to be there when caching is enabled by a plugin. If you don't have the /wp-content/advanced-cache.php file yet, it's because you have not enabled Comet Cache from the options panel yet.


Q: So why does WordPress need to be cached?

To understand how Comet Cache works, first you have to understand what a cache file is, and why it is absolutely necessary for your site and every visitor that comes to it. WordPress (by its very definition) is a database-driven publishing platform. That means you have all these great tools on the back-end of your site to work with, but it also means that every time a Post/Page/Category is accessed on your site, dozens of connections to the database have to be made, and literally thousands of PHP routines run in harmony behind-the-scenes to make everything jive.

The problem? Well, for every request that a browser sends to your site, all of these routines and connections have to be made (yes, every single time). Geesh, what a waste of processing power, memory, and other system resources. After all, most of the content on your site remains the same for at least a few minutes at a time. If you've been using WordPress for very long, you've probably noticed that (on average) your site does not load up as fast as other sites on the web. Now you know why!

In computer science, a cache (pronounced /kash/) is a collection of data duplicating original values stored elsewhere or computed earlier, where the original data is expensive to fetch (owing to longer access time) or to compute, compared to the cost of reading the cache. In other words, a cache is a temporary storage area where frequently accessed data can be stored for rapid access. Once the data is stored in the cache, it can be used in the future by accessing the cached copy rather than re-fetching or recomputing the original data.


Q: Where are cache files stored on my server?

Cache files are stored in a special directory: /wp-content/cache/comet-cache/cache. This directory needs to remain writable, just like the /wp-content/uploads directory on many WordPress installations. The .../comet-cache/cache directory is where cache files reside. These files are stored using an intuitive directory structure with file names based on the request URL (HTTPS/HTTP_HOST/REQUEST_URI). See also: WordPress Dashboard Comet Cache Plugin Options Cache Expiration Time for further details.

Whenever a request comes in from someone on the web, Comet Cache checks to see if it can serve a cached file; i.e. it looks at the HTTPS/HTTP_HOST/REQUEST_URI environment variables, then it checks the .../comet-cache/cache directory. If a cache file has been built already, and it matches an existing HTTPS.HTTP_HOST.REQUEST_URI combination; and it is not too old (see: WordPress Dashboard Comet Cache Plugin Options Cache Expiration Time), then it will serve that file instead of asking WordPress to regenerate it. This adds tremendous speed to your site and reduces server load.

If you have GZIP compression enabled, then the cache file is also sent to the browser with compression (recommended). Modern web browsers that support this technique will definitely take advantage of it. After all, if it is easier to email a zip file, it's also easier to download a web page that way. That is why on-the-fly GZIP compression for web pages is recommended. This is supported by all modern browsers.

If you want to enable GZIP, create an .htaccess file in your WordPress installation directory and put the following few lines in it. Alternatively, if you already have an .htaccess file, just add these lines to it, and that is all there is to it. GZIP is now enabled!

<IfModule deflate_module>
    <IfModule filter_module>
        AddOutputFilterByType DEFLATE text/plain text/html
        AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
        AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
        AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
        AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
        AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
    </IfModule>
</IfModule>

If your installation of Apache does not have mod_deflate installed. You can also enable GZIP compression using PHP configuration alone. In your php.ini file, you can simply add the following line anywhere: zlib.output_compression = on.


Q: What happens if a user logs in? Are cache files used then?

By default, Comet Cache does not serve cached pages to users who are logged in, or to users who have left comments recently. Comet Cache also excludes administrative pages, login pages, POST/PUT/DELETE/GET(w/ query string) requests and/or CLI processes. That being said, the Pro version of Comet Cache does make it possible to cache pages even when users are logged-in — adding even more speed! This is particularly helpful on membership sites; e.g., sites that run plugins like s2Member.


Q: Will comments and other dynamic parts of my blog update immediately?

It depends on your configuration of Comet Cache. There is an automatic expiration system (the garbage collector) which runs in WordPress behind-the-scenes, according to your Expiration setting (see: WordPress Dashboard Comet Cache Plugin Options Cache Expiration Time). There is also a built-in expiration time on existing files that is checked before any cache file is served up, which also uses your Expiration setting. In addition, whenever you update a Post or a Page, Comet Cache can automatically clear that particular file from the cache so it instantly becomes fresh again. Otherwise, your visitors would need to wait for the previous cached version to expire.

By default, Comet Cache does not serve cached pages to users who are logged in, or to users who have left comments recently. Comet Cache also excludes administrative pages, login pages, POST/PUT/DELETE/GET(w/ query string) requests and/or CLI processes.


Q: How do I enable GZIP compression? Is GZIP supported?

There is no need to use an .htaccess file with Comet Cache — caching is handled by WordPress/PHP alone. That said, if you also want to take advantage of GZIP compression (and we do recommend this), then you will need an .htaccess file to accomplish that part. Comet Cache supports GZIP compression on its output. However, it does not handle GZIP compression directly. We intentionally left GZIP compression out of this plugin, because GZIP compression is something that should really be enabled at the Apache/Nginx level or inside your php.ini file. GZIP compression can be used for things like JavaScript and CSS files as well, so why bother turning it on for only WordPress-generated pages when you can enable GZIP at the server level and cover all the bases!

If you want to enable GZIP, create an .htaccess file in your WordPress installation directory and put the following few lines in it. Alternatively, if you already have an .htaccess file, just add these lines to it, and that is all there is to it. GZIP is now enabled!

<IfModule deflate_module>
    <IfModule filter_module>
        AddOutputFilterByType DEFLATE text/plain text/html
        AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
        AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
        AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
        AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
        AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
    </IfModule>
</IfModule>

If your installation of Apache does not have mod_deflate installed. You can also enable GZIP compression using PHP configuration alone. In your php.ini file, you can simply add the following line anywhere: zlib.output_compression = on.


Q: I'm a plugin developer. How can I prevent certain files from being cached?

define('COMETCACHE_ALLOWED', false); // The easiest way.
// or $_SERVER['COMETCACHE_ALLOWED'] = false; // Also very easy.
// or define('DONOTCACHEPAGE', true); // For compatibility with other cache plugins.

When your script finishes execution, Comet Cache will know that it should not cache that particular page. It does not matter where or when you define this constant; i.e., define('COMETCACHE_ALLOWED', true);, because Comet Cache is the last thing to run during execution. So as long as you define this constant at some point in your routines, everything will be fine.

Comet Cache also provides support for define('DONOTCACHEPAGE', true), which is used by the WP Super Cache plugin as well. Another option is: $_SERVER['COMETCACHE_ALLOWED'] = false. The $_SERVER array method is useful if you need to disable caching at the Apache/Nginx level using mod_rewrite. The $_SERVER array is filled with all environment variables, so if you use mod_rewrite to set the COMETCACHE_ALLOWED environment variable, that will end up in $_SERVER['COMETCACHE_ALLOWED']. All of these methods have the same end result, so it's up to you which one you'd like to use.


Q: What should my expiration setting be?

If you don't update your site much, you could set this to 6 months, optimizing everything even further. The longer the cache expiration time is, the greater your performance gain. Alternatively, the shorter the expiration time, the fresher everything will remain on your site. A default value of 7 days (recommended expiration time), is a good conservative middle-ground.

Keep in mind that your expiration setting is only one part of the big picture. Comet Cache will also purge the cache automatically as changes are made to the site (e.g., when you edit a post, someone comments on a post, you change your theme, you add a new navigation menu item, etc.). Thus, your expiration time is really just a fallback; i.e., the maximum amount of time that a cache file could ever possibly live.

You could set this to just 60 seconds and you would still see huge differences in speed and performance. If you're just starting out with Comet Cache (perhaps a bit nervous about old cache files being served to your visitors), you could set this to something like 30 minutes and experiment with it while you build confidence in Comet Cache. It's not necessary, but many site owners have reported this makes them feel like they're more-in-control when the cache has a short expiration time. All-in-all, it's a matter of preference.


Q: EMERGENCY: If all else fails, how can I remove Comet Cache?

Ordinarily you can just deactivate Comet Cache from the plugins menu in WordPress. However, if you're having a more serious issue, please follow the instructions here.

  1. Log into your site via FTP, perhaps using FileZilla.
  2. Delete this file: /wp-content/advanced-cache.php
  3. Delete this directory: /wp-content/plugins/comet-cache/ and/or /wp-content/plugins/comet-cache-pro/
  4. Remove this line from your /wp-config.php file: define( 'WP_CACHE', TRUE );

Comet Cache is now completely uninstalled and you can start fresh.


Q: What if I have questions not covered here?