Closed davidwparker closed 10 years ago
Oh, I should have explored a little more. Seems that Angular's resource uses it's own internal cache still (with the name), I have to reference the actual $angularCacheFactory
:
var userCache = $angularCacheFactory.get('userCache');
var User = $resource(
'/users/:id',
{id:"@id"},
{
query: {
method:'GET',
isArray:true,
cache:userCache,
}
}
);
Closing!
I couldn't see where to contact you, so I'm asking here (sorry!)
Question: why isn't my
onExpire
function firing?CODE (I'm injecting
$angularCacheFactory
into a factory which a resource):Thanks!
Edit: I'm using angular-cache-2.3.1.js