Sha256: 136957f29998eb0dba829735d3834704a1e4851f2578e9c68fb134830abf096b
Contents?: true
Size: 461 Bytes
Versions: 34
Compression:
Stored size: 461 Bytes
Contents
module Workarea class RackCacheConfigMiddleware def initialize(app) @app = app end def call(env) request = Rack::Request.new(env) env['rack-cache.cache_key'] = Cache::RackCacheKey if request.path !~ /(jpe?g|png|ico|gif|css|js)$/ env['rack-cache.force-pass'] = request.cookies['cache'] == 'false' env['workarea.cache_varies'] = Cache::Varies.new(env).to_s end @app.call(env) end end end
Version data entries
34 entries across 34 versions & 1 rubygems