jmdobry / angular-cache

angular-cache is a very useful replacement for the Angular 1 $cacheFactory.
http://jmdobry.github.io/angular-cache
MIT License
1.39k stars 156 forks source link

CacheFactory.destroy(cacheId) #168

Closed butchewing closed 9 years ago

butchewing commented 9 years ago

CacheFactory.destroy(cacheId) does not appear to be removing the cache with the given cacheId.

jmdobry commented 9 years ago

Here is a plunker that demonstrates a cache being destroyed via CacheFactory#destroy(cacheId).

Perhaps you could use the plunker to reproduce the issue.

butchewing commented 9 years ago

Oh, I misunderstood what the cacheId was. I was trying to destroy the data using a cache key.

CacheFactory.destroy(cacheId) works as expected. Where cacheId is the ID of the CacheFactory.

In the following code block the cacheId is 'newCache' CacheFactory('newCache');