Method: ReactiveRecord::ServerDataCache::CacheItem#initialize

Defined in:
lib/reactive_record/server_data_cache.rb

#initialize(db_cache, acting_user, klass, preloaded_records) ⇒ CacheItem

Returns a new instance of CacheItem.



160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/reactive_record/server_data_cache.rb', line 160

def initialize(db_cache, acting_user, klass, preloaded_records)
  klass = klass.constantize
  @db_cache = db_cache
  @acting_user = acting_user
  @vector = @absolute_vector = [klass]
  @ar_object = klass
  @record_chain = []
  @parent = nil
  @root = self
  @preloaded_records = preloaded_records
  db_cache << self
end