module Cachers
Constants
- VERSION
Public Class Methods
models()
click to toggle source
# File lib/cachers.rb, line 19 def models if Rails.configuration.cache_classes == false Rails.application.eager_load! end ActiveRecord::Base.descendants.select do |model| model.included_modules.include?(Cachers::Concern) && model.descendants.none? end end
redis()
click to toggle source
# File lib/cachers.rb, line 12 def redis @redis ||= begin require 'redis' Redis.new YAML.load_file("#{Rails.root}/config/redis.yml")[Rails.env] end end