Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching #32

Closed
artlowel opened this issue Dec 20, 2016 · 1 comment
Closed

Add caching #32

artlowel opened this issue Dec 20, 2016 · 1 comment
Assignees
Milestone

Comments

@artlowel
Copy link
Member

artlowel commented Dec 20, 2016

This task depends on #31

  • Each Data service created in Implement services to interact with the REST API #31 should have a cache.
  • users of the data services (meaning components, other services, …) shouldn't need to know about the cache. They should just go on working the same way (with the same observables) as if the data came from the REST API.
  • This cache should store its data in the ngrx store
  • It should be implemented in such a way that most code can be shared between data services for different endpoints
  • But it should be possible to determine separate time-to-live for each endpoint. For some endpoints it may be necessary to disable the cache altogether
  • It should also be possible to combine partial objects:
    • e.g. I first get only a collection's id, name and handle from the REST API, for a certain page
    • next I go to another page and I get that same collection's id and shortDescription from the REST API, but not it's name or handle
    • the store should now contain the collection's name, handle and shortDescription
@artlowel
Copy link
Member Author

Initial cache is done.

This ticket was left open because the code still lacks tests and documentation. This was moved to a separate issue: #130

@ghost ghost removed the work in progress label Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant