This repository was archived by the owner on Aug 18, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ts-angular-jsonapi" ,
3
- "version" : " 0.6.22 " ,
3
+ "version" : " 0.6.24 " ,
4
4
"description" : " JSONAPI library developed for AngularJS in Typescript" ,
5
5
"repository" : {
6
6
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -307,8 +307,10 @@ export class Service extends ParentResourceService implements IService {
307
307
}
308
308
309
309
public clearCacheMemory ( ) : boolean {
310
- return this . getService ( ) . cachememory . deprecateCollections ( this . type ) &&
311
- this . getService ( ) . cachestore . deprecateCollections ( this . type ) ;
310
+ let path = new PathBuilder ( ) ;
311
+ path . applyParams ( this ) ;
312
+ return this . getService ( ) . cachememory . deprecateCollections ( path . getForCache ( ) ) &&
313
+ this . getService ( ) . cachestore . deprecateCollections ( path . getForCache ( ) ) ;
312
314
}
313
315
314
316
public parseFromServer ( attributes : IAttributes ) : void {
Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ export class CacheStore implements ICacheStore {
108
108
) ;
109
109
}
110
110
111
- public deprecateCollections ( collection_type : string ) {
111
+ public deprecateCollections ( path_start_with : string ) {
112
112
Core . injectedServices . JsonapiStoreService . deprecateObjectsWithKey (
113
- 'collection.' + collection_type
113
+ 'collection.' + path_start_with
114
114
) ;
115
115
return true ;
116
116
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export class PathBuilder {
6
6
public includes : Array < string > = [ ] ;
7
7
private get_params : Array < string > = [ ] ;
8
8
9
- public applyParams ( service : IService , params : IParamsResource | IParamsCollection ) {
9
+ public applyParams ( service : IService , params : IParamsResource | IParamsCollection = { } ) {
10
10
this . appendPath ( service . getPrePath ( ) ) ;
11
11
params . beforepath ? this . appendPath ( params . beforepath ) : null ;
12
12
this . appendPath ( service . getPath ( ) ) ;
You can’t perform that action at this time.
0 commit comments