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

Resource.$clearCache() clears local storage but not in-memory cache #82

Open
mmautner opened this issue Nov 17, 2015 · 1 comment
Open

Comments

@mmautner
Copy link

As described, Resource.$clearCache() clears my localStorage cache for the given resource, however the next Resource.query() call appears to read from the in-memory angular cache and re-populates the localStorage cache w/o making a new HTTP request.

Can you give some guidance on how to clear both the localStorage cache and the angular in-memory cache for a given Resource?

@mmautner
Copy link
Author

Here's my example $cachedResource:

$cachedResource(
  'lead_list',
  BASE_URL + '/api/projects/:projectSlug/leads/:id';
  {
    projectSlug: '@projectSlug',
    id: '@id'
  }, {
    query: {method:'GET', cache: true}
  });

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