开发者

Ignore googlebot for Rack::Cache?

开发者 https://www.devze.com 2023-04-01 11:11 出处:网络
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 actuall开发者_C百科y represent the most popular ones on my site, I can\'t se

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 actuall开发者_C百科y 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?


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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号