Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

change annotation refresher to use internal angular caching #470

Open
stuartnelson3 opened this issue Nov 23, 2015 · 0 comments
Open

change annotation refresher to use internal angular caching #470

stuartnelson3 opened this issue Nov 23, 2015 · 0 comments

Comments

@stuartnelson3
Copy link
Collaborator

the annotation refresher is doing it's own hacky thing to cache requests for annotations.

this can be replaced with https://docs.angularjs.org/api/ng/service/$http#caching, but maintaining the same api.

change the GET request to set cache: true:

$http.get(dashboardURL + 'annotations', {
  params: {
    'tags[]': t,
    until: until,
    range: r
  },
  cache: true
})

then have the clearCache function delete the $httpCache.

something along these lines. The rest of the code can go away.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant