Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将 angular-cache 用于 localStorage 功能。但是,我发现在尝试销毁或清空我的所有缓存时,似乎只清除了内存中的缓存,而不是 localStorage 缓存。我怎样才能使两个缓存都被清除?
我提交了一个错误报告。同时,我在调用 DSCacheFactory.destroyAll() 后立即实现了这段代码:
for(var i in $window.localStorage){ if(i.indexOf("angular-cache.caches")>-1){ $window.localStorage.removeItem(i); } }