Commit cc29a49720253d4703e67b0b023a74d3a3c6e14f
Committed by
Antonio Terceiro
1 parent
f6f306c5
Exists in
staging
and in
32 other branches
Fix rails 4 caching expiration
Signed-off-by: Carlos Purificacao <carloseugenio@gmail.com> Acked-by: Antonio Terceiro <terceiro@colivre.coop.br>
Showing
3 changed files
with
6 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -1241,7 +1241,7 @@ module ApplicationHelper |
1241 | 1241 | end |
1242 | 1242 | |
1243 | 1243 | def cache_timeout(key, timeout, &block) |
1244 | - cache(key, { :expires_in => timeout }, &block) | |
1244 | + cache(key, { :expires_in => timeout, :skip_digest => true }, &block) | |
1245 | 1245 | end |
1246 | 1246 | |
1247 | 1247 | def is_cache_expired?(key) | ... | ... |
app/models/block.rb
... | ... | @@ -235,7 +235,7 @@ class Block < ActiveRecord::Base |
235 | 235 | |
236 | 236 | alias :active_record_cache_key :cache_key |
237 | 237 | def cache_key(language='en', user=nil) |
238 | - active_record_cache_key+'-'+language | |
238 | + active_record_cache_key + '-' + language | |
239 | 239 | end |
240 | 240 | |
241 | 241 | def timeout | ... | ... |
plugins/event/lib/event_plugin/event_block.rb