Sha256: 64e36af5f91218c9f83a7b5a5fe7d7f30e24399f658d38d52e01db7a74f47ad9

Contents?: true

Size: 1.38 KB

Versions: 4

Compression:

Stored size: 1.38 KB

Contents

# -*- encoding : utf-8 -*-
require 'second_level_cache/active_record/base'
require 'second_level_cache/active_record/core'
require 'second_level_cache/active_record/fetch_by_uniq_key'
require 'second_level_cache/active_record/finder_methods'
require 'second_level_cache/active_record/persistence'
require 'second_level_cache/active_record/belongs_to_association'
require 'second_level_cache/active_record/has_one_association'
require 'second_level_cache/active_record/preloader'
require 'second_level_cache/active_record/multi_read_from_cache'

if defined? Rails
  require 'second_level_cache/active_record/railtie'
else
  ActiveRecord::Base.send(:include, SecondLevelCache::Mixin)
  ActiveRecord::Base.send(:include, SecondLevelCache::ActiveRecord::Base)
  ActiveRecord::Base.send(:extend, SecondLevelCache::ActiveRecord::FetchByUniqKey)
  ActiveRecord::Base.send(:extend, SecondLevelCache::ActiveRecord::MultiReadFromCache)

  ActiveRecord::Base.send(:include, SecondLevelCache::ActiveRecord::Persistence)
  ActiveRecord::Associations::BelongsToAssociation.send(:include, SecondLevelCache::ActiveRecord::Associations::BelongsToAssociation)
  ActiveRecord::Associations::HasOneAssociation.send(:include, SecondLevelCache::ActiveRecord::Associations::HasOneAssociation)
  ActiveRecord::Associations::Preloader::BelongsTo.send(:include, SecondLevelCache::ActiveRecord::Associations::Preloader::BelongsTo)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
second_level_cache-2.1.16 lib/second_level_cache/active_record.rb
second_level_cache-2.1.15 lib/second_level_cache/active_record.rb
second_level_cache-2.1.14 lib/second_level_cache/active_record.rb
second_level_cache-2.1.13 lib/second_level_cache/active_record.rb