Lite Cache

Lite Cache is an efficient cache plug-in for WordPress. It’s simple, like Hyper Cache but easy to configure.

Lite Cache is at end of life. All it’s features has been merged in Hyper Cache. You can install Hyper Cache e delete Lite Cache without loose any performance.

Please, to migrate to Hyper Cache, take not of all Lite Cache configurations. The complete dismissing procedure is described below.

If possible use the forum to ask for help.

Lite Cache is compatible with gzip compression and handles it automatically.

Lite Cache works even with commentators, people who left a comment in the past. Other caching plug-in usually are not able to serve cached content to commentators. This is of great importance for blogs with many returning commentators.

Lite Cache can detect mobile devices, create a separate cache for them and can force a secondary template for mobile devices.

Lite Cache can cache the pages even when the visitor is a logged in user, but it is not recommended and the option should be enabled ONLY if you know what to change in your theme to avoid disaster.

Lite Cache is actually used on a blog, www.periodofertile.it, which counts over a 1,500,000 page views per month and is saving the little virtual server where it is installed (with other two blogs). It is used on my personal Italian blog too, www.zeroblog.it, if you would see the page signed by Lite Cache.

Install it and go to the options panel to find how to configure it.

Download

Get Lite Cache from WordPress Plugin Directory.

Dismissing

To totally dismiss Lite Cache removing any element of it’s installation, you should follow those steps.

  1. delete the options from the database using the special button in the administration panel
  2. deactivate the plugin and remove it’s file (from the WordPress plugin panel)
  3. delete the file wp-content/advanced-cache.php
  4. delete the folder wp-content/cache/lite-cache
  5. Optionally you can remove the define(‘WP_CACHE’, true) in the wp-config.php file if you plan to NOT install another cache plugin

The Vary header

When a site serves different page versions to different devices (usually desktop and mobile) Google recommends to add a Vary header. This header, in few words, says: pay attention that the URL requested can put out different content depending on … (and the value of the Vary header determines what is the discriminant).

Lite cache sends this header when it manages the compression and when a different mobile theme is used, to be fully compliant with Google responsive design recommendations.

More about:

F.A.Q.

Is it compatibile with multi-site installation?

Never tested, but I think it is not compatibile is you use third level domains.

Is it compatible with plug-ins designed to detect mobile devices?

Yes if the list of mobile agents configured on Lite Cache is the same of the one configured on your mobile plug-in.

How does it work?

Lite Cache grabs the generated page HTML of almost any page of your blog and stores it on a disk cache. It grabs the
page only on first request, the cache content is not generated on first activation.

Lite Cache, dfferently from other cache systems, operates even when the blog is surfed by people who commented the blog
and grants (when possible) to fill the comment box fields with user’s data without exposing it to other visitors. If your theme
blocks this feature, I cannot fix it and the comment box fields will be left empty.

Lite Cache does not operate under some circumstances:

  1. When a not found page is generated (404 error)
  2. When the feed is generated
  3. When a WordPress user is logged in and surfs the blog if not explicitely enabled
  4. When the virtual robots.txt page is generated
  5. When a request is a trackback from other blogs
  6. When a plugin force the global variable “$cache_stop” to true (read more on my standard proposal for cache systems)
  7. When a request matches one of the excluded paths

When the cache is cleaned up (invalidated)?

Lite Cache cleans up the cache when the blog content is changed, with these rules (no, they are not configurable):

  1. When a post is changed its cached page is removed with the home, tags, type, current year, feeds and categories cached pages
  2. When a post gets a comment only its cached page is removed (that removes the pages comments and the comment feed as well)

How can I check if it is working?

  1. Open your browser and go to the blog admin side.
  2. Log in.
  3. Log out (on right top there is that option).
  4. Open a blog page.
  5. Reload it a couple of time.
  6. Look at the page HTML source: last line should be looks like <!– lite cache… –>

It does not work!

Have you tried to follow the steps on previous answer?

It still does not work.

May be Lite Cache is not compatible with your installation: do not use it. My blogs use it and it works on them. It happens.

Does Lite cache correctly manages the paged comments?

Yes, it does.

Are feeds cached?

Yes, they are and there is no option to avoid that.

Can I use a different folder for the cache?

Yes, under advanced options you can set that. Pay attention to “point” to a writable folder otherwise no file will be written. This option is useful when you have a partition which is quicker than the one where the blog is installed or to avoid to have cache file inside the blog folder (that should be excluded from backup and that, usually, use a lot of disk space).

There is an option to stop the cache for specific agents?

No.

There is an option to stop the cache for specific cookies?

No.

There is an option to stop the cache for specific URLs?

Yes. On administration panel you can set a list of URLs (to be correct URIs) to be excluded from the caching process. every requested page address is matched with the list of “to be rejected” URIs and it “starts with” on of them is skipped.

There are options to control the cache at post and page level (eg. on editing panel)?

No.

Can I avoid to cache the home page?

No.

Can I stop the cache for Google Bot or other search engine bots?

No.

Does Lite Cache caches images?

No, it has no meaning, not only for Lite Cache usually for every cache system. If with “caching images” you means a CDN integration, no there is no CDN integration.

Does Lite Cache minify or cleans up the HTML code?

No, even with tidy installed, it creates too much issues with XML snipped from Facebook and others. I definitively removed it.

Does Lite Cache minify Javascript or CSS?

No.

Does Lite Cache can use CDNs?

No.

Can be used in conjunction with Apache Rewrite Engine and the .htaccess?

Yes, when you save the options the snippet of rules to copy inside the .htaccess. Not all Lite Cache options works using .htaccess rules. Some user’s reported a more efficient caching without using all that rules on .htaccess, but I really don’t have scientific tests.

It is mandatory to modify the .htaccess?

No, and if you don’t know how to modify it, please don’t try to edit the file. If you want to try, keep a backup. If the site does not show up after an .htaccess modification, restore the original .htaccess.

Does Lite Cache is compatible with mfunc?

No, it is not.

How can Lite Cache stopped on a specific page by third party plug-in or short code?

Any plug-in that want to avoid a specific page to be cached, must set to false the global variable $cache_stop. For example I force it to false on some of my plug-in short codes when they generate different output depending on who is navigating the site.

How to filter the cached content of a page

Register a standard WordPress filter with name “cache_buffer”: the buffer is passed on your function and your function can process it and return the modified content that will be stored. An example:

function my_cache_buffer_filter($buffer) {
return $buffer . ‘&lt!– I was here –>;
}

add_filter(‘cache_buffer’, ‘my_cache_buffer_filter’);

Can I set Lite Cache to cache only newer posts?

Yes, you can set Lite Cache to not store old posts into the cache. Usually this is recommendable with very big blogs which do not have traffic on old posts but only on the newer ones. It saves a lot of disk space and avoids that a single visit on a old post (by humans or bots) to use disk space.

The administrative panel is translated or translatable?

Actually not.


Leave a Reply