File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ export interface StoreSettings {
2626}
2727
2828export default class Store {
29- source : MemorySource ;
30- cache : Cache ;
29+ private _source : MemorySource ;
30+ private _cache : Cache ;
3131
3232 static create ( injections : StoreSettings ) : Store {
3333 const owner = getOwner ( injections ) ;
@@ -37,18 +37,26 @@ export default class Store {
3737 }
3838
3939 constructor ( settings : StoreSettings ) {
40- this . source = settings . source ;
40+ this . _source = settings . source ;
4141
42- this . cache = new Cache ( {
42+ this . _cache = new Cache ( {
4343 sourceCache : this . source . cache ,
4444 modelFactory : new ModelFactory ( this )
4545 } ) ;
4646 }
4747
4848 destroy ( ) {
49- this . cache . destroy ( ) ;
50- delete this . source ;
51- delete this . cache ;
49+ this . _cache . destroy ( ) ;
50+ delete this . _source ;
51+ delete this . _cache ;
52+ }
53+
54+ get source ( ) : MemorySource {
55+ return this . _source ;
56+ }
57+
58+ get cache ( ) : Cache {
59+ return this . _cache ;
5260 }
5361
5462 get keyMap ( ) : KeyMap | undefined {
You can’t perform that action at this time.
0 commit comments