WordPress Plugin: Keep Your Cache Up-to-Date

Here’s a plugin that will automatically repopulate your LiteSpeed Cache when an article gets updated on WordPress — enjoy LSCache speed and article updates without waiting for cache to expire.

To install the plugin, just download lscache-purge plugin and add to WP plugins (Plugins => Add New => Upload).


Or, install directly using the Search tab and the plugin URL (http://www.litespeedtech.com/packages/wp-plugins/lscache-purge.zip).


Once installed, go to Installed Plugins and activate it.


The plugin comes with GUI under Settings for choosing the purge cache method — purge or refresh.



For details on refreshing the cache, refer to this blog entry.

Next, enable LiteSpeed Cache, if you have not done so.

WebAdmin console => Configuration => Server => Cache

Cache Storage Settings
Storage Path: /disk/lscache
Max Object Size: 128000

Cache Policy
Enable Cache: Yes
Cache Expire Time (seconds): 120
Cache Stale Age (seconds): Not Set
Cache Request with Query String: No
Cache Request with Cookie: Yes
Cache Response with Cookie: Yes
Ignore Request Cache-Control: Yes
Ignore Response Cache-Control: Yes
Enable Private Cache: Not Set
Private Cache Expire Time (seconds): Not Set

Do-Not-Cache URL

Here’s a screenshot of the cache setup:


For more details on how to set up LiteSpeed Cache, refer to our wiki.

Note the “Do-Not-Cache URL” box. It specifies URL patterns not to be cached. In this case, URLs that start with “/wp-admin” are excluded from being cached.

That’s it. LSCache will take care of the rest. Have fun!

Screen Shot 2013-02-19 at 10.35.36 AMStormtrooper photo courtesy of Flickr user JD Hancock, licensed via Creative Commons.


Related Posts