aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/digestor.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-05-16 21:34:16 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2016-05-16 21:34:16 +0200
commit23b6a9c0fcb8992e18450d6fe0680bf09685b7db (patch)
tree6d04277ef922685b87a7621c6bcb503b2a866962 /actionview/lib/action_view/digestor.rb
parent8fffee4b1cd7f742edb267d72f4007d0ed4c594b (diff)
downloadrails-23b6a9c0fcb8992e18450d6fe0680bf09685b7db.tar.gz
rails-23b6a9c0fcb8992e18450d6fe0680bf09685b7db.tar.bz2
rails-23b6a9c0fcb8992e18450d6fe0680bf09685b7db.zip
Replace middleware with executor callback.
Per request digest caches were added before we had hooks into different units of work that Rails performs. As such the most reliable way to prevent stale cache digests was with a middleware. The middleware prevented staleness in Action Controller requests. However, the executor is superior because it should also prevent staleness when running just Active Job jobs or broadcasting through Action Cable's server.
Diffstat (limited to 'actionview/lib/action_view/digestor.rb')
-rw-r--r--actionview/lib/action_view/digestor.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb
index b99d1af998..53baf044f1 100644
--- a/actionview/lib/action_view/digestor.rb
+++ b/actionview/lib/action_view/digestor.rb
@@ -6,13 +6,6 @@ module ActionView
class Digestor
@@digest_mutex = Mutex.new
- class PerRequestDigestCacheExpiry < Struct.new(:app) # :nodoc:
- def call(env)
- ActionView::LookupContext::DetailsKey.clear
- app.call(env)
- end
- end
-
class << self
# Supported options:
#