Skip to content
This repository was archived by the owner on Aug 18, 2018. It is now read-only.

Commit 1139796

Browse files
committed
solve problem with cache when reload page. now when get from store, save on memory
1 parent 5e0c735 commit 1139796

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ts-angular-jsonapi",
3-
"version": "0.6.21",
3+
"version": "0.6.22",
44
"description": "JSONAPI library developed for AngularJS in Typescript",
55
"repository": {
66
"type": "git",

src/library/service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ export class Service extends ParentResourceService implements IService {
211211
tempororay_collection.$source = 'store';
212212
tempororay_collection.$is_loading = false;
213213

214+
// when load collection from store, we save collection on memory
215+
this.getService().cachememory.setCollection(path.getForCache(), tempororay_collection);
216+
214217
// localfilter getted data
215218
localfilter.filterCollection(tempororay_collection, cached_collection);
216219

0 commit comments

Comments
 (0)