Lite Cache is an efficient cache plug-in for WordPress. It’s simple, like Hyper Cache but easy to configure.
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.
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:
- When a not found page is generated (404 error)
- When the feed is generated
- When a WordPress user is logged in and surfs the blog if not explicitely enabled
- When the virtual robots.txt page is generated
- When a request is a trackback from other blogs
- When a plugin force the global variable “$cache_stop” to true (read more on my standard proposal for cache systems)
- 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):
- When a post is changed its cached page is removed with the home, tags, type, current year, feeds and categories cached pages
- 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?
- Open your browser and go to the blog admin side.
- Log in.
- Log out (on right top there is that option).
- Open a blog page.
- Reload it a couple of time.
- 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 . ‘<!– 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.
by Stefano Lissa
Hello Stefano,
First of all, many thanks for this very useful plugin. I’ve posted a couple of questions on the WP Support but got no answers till now so I dare to ask you directly here.
My first question is about how to set up the valid time of the cache.
I’m not a pro and I don’t know if a very short time is better , or a few hours, etc.
My site has a low traffic, and is hosted on a shared server that runs with LiteSpeed.
Since I added your plugin my loading time is much shorter and I’m very glad of that.
See the test : <a href="http://www.webpagetest.org/result/130430_Y3_75eb68e0b7251c04aa87168cb0160f63/"
But I wonder about why I get grade D on cache static content?
Any advice for those two questions?
Thanks a lot, in advance.
Hazlo
Hi, sorry is I missed to answer on wordpress I need to check if I enabled to notifications. About static content it has nothing to do with caching of html, it refers to header youy should set on server to enable caching at the browser level. The configuration on apache require mod_header or mod_expire.
Many thanks Stefano for answering. I’ll check the server cache with my hoster.
But could you give me an advice about how to set up the valid time in the plugin?
I tried 4 hours and finally I’ve set it to 24 hours. Is that ok for a small site like mine?
Thanks a lot for your patience!
There is not a real answer, you can leave the value to 24 hours or more. On some blogs I set it to zero (it means indefinitely).
Of course if you have widget which show the latest post, more old is the cached age more old are the listed posts. This is probably the main measure to decide the number of hours.
Good plugin! But there is one big problem when categories which have not base (null-base). It’s seems to me the best way is to get path of each post’s category and to clear it’s cache separatly. Sorry for my english(
The plugin know nothing about category with no base, and probably cannot detect them. Category with no base are usually managed by specialized plugins. It’s your case?