49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/entity_store/entity_store.rb', line 49
def build(category: nil, specifier: nil, snapshot_interval: nil, session: nil)
instance = new
instance.category = category
instance.session = session
instance.configure
Build.assure(instance)
specifier ||= instance.specifier
EntityCache.configure(
instance,
entity_class,
specifier,
persist_interval: instance.snapshot_interval,
external_store: instance.snapshot_class,
external_store_session: session,
attr_name: :cache
)
instance
end
|