module ActionController::Caching::RedisPages

Constants

INSTANCE_PATH_REGEX

Public Instance Methods

cache_redis_page(content, path, options = {}) click to toggle source
# File lib/action_controller/caching/redis_pages.rb, line 47
def cache_redis_page(content, path, options = {})
  RedisPage.page_content_writter.write(content, path, options)
end
compress_content(content) click to toggle source
# File lib/action_controller/caching/redis_pages.rb, line 36
def compress_content(content)
  case RedisPage.compress_method
  when :deflate
    Zlib::Deflate.deflate(content)
  when :gzip
    ActiveSupport::Gzip.compress(content)
  else
    content
  end
end
record_cached_page() click to toggle source
# File lib/action_controller/caching/redis_pages.rb, line 51
def record_cached_page
  path, model_name, model_id = INSTANCE_PATH_REGEX.match(request.path).to_a
  if model_id
    mark_cache_instance(model_name, model_id)
  end
end