Module: Blacksand::CachingPages

Extended by:
ActiveSupport::Concern
Defined in:
lib/blacksand/caching_pages.rb

Instance Method Summary collapse

Instance Method Details

#caching_allowed?Boolean

覆盖 actionpack-page_caching 的方法,如果页面带参数将不会生成缓存页。例如带分页的页面。

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/blacksand/caching_pages.rb', line 10

def caching_allowed?
  return false if request.query_string.present?

  super
end