[Add] Cache models on instantiation

...to remove need for Edit to persist these immediately, which in
turn causes #770 and #678
This commit is contained in:
Victor Woeltjen
2016-03-21 10:18:06 -07:00
parent ad4c456ca2
commit 17faf000b0
5 changed files with 86 additions and 12 deletions

View File

@@ -27,6 +27,7 @@ define([
"./src/models/StaticModelProvider",
"./src/models/RootModelProvider",
"./src/models/ModelAggregator",
"./src/models/ModelCacheService",
"./src/models/PersistedModelProvider",
"./src/models/CachingModelDecorator",
"./src/models/MissingModelDecorator",
@@ -58,6 +59,7 @@ define([
StaticModelProvider,
RootModelProvider,
ModelAggregator,
ModelCacheService,
PersistedModelProvider,
CachingModelDecorator,
MissingModelDecorator,
@@ -182,7 +184,10 @@ define([
{
"provides": "modelService",
"type": "decorator",
"implementation": CachingModelDecorator
"implementation": CachingModelDecorator,
"depends": [
"cacheService"
]
},
{
"provides": "modelService",
@@ -319,6 +324,7 @@ define([
"key": "persistence",
"implementation": PersistenceCapability,
"depends": [
"cacheService",
"persistenceService",
"identifierService",
"notificationService",
@@ -354,6 +360,10 @@ define([
}
],
"services": [
{
"key": "cacheService",
"implementation": ModelCacheService
},
{
"key": "now",
"implementation": Now