New Caching Plugin Gator Cache Compatible with Woocommerce

I like to use Hyper Cache plugin for my WordPress sites. But I recently noticed that it doesn’t work well with Woocommerce shop. Problems with add to cart, remove etc. So instead tried new Gator Cache plugin, and it works well.

Installed, added some settings, i.e. user roles to get cached pages, cached post types etc.

Also added its rules to .htaccess.

The only problem I had was Chrome browser reloading large background image on each reload, so added also rules for cache expiration (into .htaccess):

## EXPIRES CACHING  ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/pdf "access plus 1 week"
ExpiresByType text/x-javascript "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
</IfModule>
## EXPIRES CACHING ##

And it seems to resolve the problem.

Also noticed that it doesn’t gzip css and javascript files, so added:

# Declare a "gzip" filter, it should run after all internal filters
FilterDeclare  gzip CONTENT_SET

FilterProtocol gzip change=yes;byteranges=no

# Enable "gzip" filter if "Content-Type" contains "text/css" etc.
FilterProvider gzip DEFLATE resp=Content-Type $text/css
FilterProvider gzip DEFLATE resp=Content-Type $text/javascript
FilterProvider gzip DEFLATE resp=Content-Type $application/javascript
FilterProvider gzip DEFLATE resp=Content-Type $application/x-javascript

# Add "gzip" filter to the chain of filters
FilterChain    gzip

Site seems to work much faster now. Hope the development of Gator cache plugin will continue. Everybody needs Woocommerce compatible caching out of the box.

Share:
This entry was posted in WordPress and tagged . Bookmark the permalink.

One Response to New Caching Plugin Gator Cache Compatible with Woocommerce

  1. Pingback: Wordfence Falcon Cache Replacement for WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *