lib/seo_cache/middleware.rb in seo_cache-1.0.0 vs lib/seo_cache/middleware.rb in seo_cache-1.0.1
- old
+ new
@@ -19,10 +19,13 @@
if prerender_page?(env)
cached_response = before_render(env)
return cached_response.finish if cached_response.present?
- SeoCache.log('missed cache : ' + Rack::Request.new(env).path) if SeoCache.log_missed_cache
+ if SeoCache.log_missed_cache
+ env_request = Rack::Request.new(env)
+ SeoCache.log("missed cache : #{env_request.path} (User agent: #{env_request.user_agent})")
+ end
if SeoCache.prerender_service_url.present?
prerender_response = prerender_service(env)
if prerender_response
response = build_response_from_prerender(prerender_response.body)