Module: Searchgasm::Shared::VirtualClasses

Included in:
Conditions::Base, Searchgasm::Search::Base
Defined in:
lib/searchgasm/shared/virtual_classes.rb

Overview

Searchgasm Virtual Classes

Creates virtual classes for each model, to implementing a type of caching. So that object instantiation for searchgasm searches is cached. This is lazy, meaning it will only cache when it needs. So the first instantion will be much slow than the following ones. This is cached in the RAM, so if the process is restarted the caching is cleared.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



8
9
10
# File 'lib/searchgasm/shared/virtual_classes.rb', line 8

def self.included(klass)
  klass.extend ClassMethods
end