Class: Routemaster::Drain::CacheBusting
- Inherits:
-
Object
- Object
- Routemaster::Drain::CacheBusting
- Extended by:
- Forwardable
- Defined in:
- lib/routemaster/drain/cache_busting.rb
Overview
Rack application which authenticates, parses, filters duplicates in this request and invalidates the cache for all updated or new items.
See the various corresponding middleware for details on operation: Middleware::RootPostOnly, Middleware::Authenticate, Middleware::Parse, Middleware::ExpireCache and Terminator.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CacheBusting
constructor
A new instance of CacheBusting.
Methods included from Forwardable
Constructor Details
#initialize(options = {}) ⇒ CacheBusting
Returns a new instance of CacheBusting.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/routemaster/drain/cache_busting.rb', line 23 def initialize( = {}) @terminator = terminator = Terminator.new @app = ::Rack::Builder.new do use Middleware::RootPostOnly use Middleware::Authenticate, use Middleware::Parse use Middleware::Siphon, use Middleware::Filter, { filter: Routemaster::Middleware::PayloadFilter.new }.merge() use Middleware::ExpireCache run terminator end end |