Ignore googlebot for Rack::Cache?

225 Views Asked by At

I'm using Rack::Cache, and google search bot triggers all my cache misses, so my cache is always full of pages that don't actually represent the most popular ones on my site, I can't seem to find how to ignore an IP or useragent for caching, has anyone had this problem before?

1

There are 1 best solutions below

1
On BEST ANSWER

You could check for Googlebot in the user-agent string and skip caching if it is.

Search agent strings: http://www.smart-it-consulting.com/internet/google/googlebot-spoofer/