Module: ActAsCached
- Extended by:
- Configurable, ActiveSupport::Autoload
- Defined in:
- lib/act_as_cached.rb,
lib/act_as_cached/mixin.rb,
lib/act_as_cached/rails.rb,
lib/act_as_cached/helpers.rb,
lib/act_as_cached/version.rb,
lib/act_as_cached/configurable.rb,
lib/act_as_cached/active_record.rb,
lib/act_as_cached/cache_options.rb,
lib/act_as_cached/active_record/actobserver.rb,
lib/act_as_cached/active_record/association.rb,
lib/act_as_cached/active_record/finder_methods.rb,
lib/act_as_cached/active_record/singular_association.rb,
lib/act_as_cached/active_record/collection_association.rb,
lib/act_as_cached/active_record/has_many_through_association.rb
Defined Under Namespace
Modules: ActiveRecord, CacheOptions, Configurable, Helpers, Mixin
Classes: Rails
Constant Summary
collapse
- VERSION =
"0.0.5"
Class Method Summary
collapse
config, configure
Class Method Details
.hook_config! ⇒ Object
2
3
4
5
6
7
8
9
|
# File 'lib/act_as_cached/rails.rb', line 2
def self.hook_config!
ActAsCached.configure do
config.logger ||= ::Rails.logger
config.cache_store ||= ::Rails.cache
config.expires_time ||= 1.week
config.prefix ||= 'aac'
end
end
|
.hook_rails! ⇒ Object
11
12
13
14
15
16
|
# File 'lib/act_as_cached/rails.rb', line 11
def self.hook_rails!
if defined?(::ActiveRecord)
require 'act_as_cached/active_record'
::ActiveRecord::Base.send(:include,Mixin)
end
end
|