The options object ($angularCacheFactory(), AngularCache#setOptions(), and $angularCacheFactoryProvider.setCacheDefaults()) now accepts a disabled field, which can be set to true and defaults to false.
$angularCacheFactory.enableAll() will enable any disabled caches.
$angularCacheFactory.disableAll() will disable all caches.
A disabled cache will operate as normal, except AngularCache#get() and AngularCache#put() will both immediately return undefined instead of performing their normal functions.
2.3.0 - 09 January 2014
options
object ($angularCacheFactory()
,AngularCache#setOptions()
, and$angularCacheFactoryProvider.setCacheDefaults()
) now accepts adisabled
field, which can be set totrue
and defaults tofalse
.$angularCacheFactory.enableAll()
will enable any disabled caches.$angularCacheFactory.disableAll()
will disable all caches.AngularCache#get()
andAngularCache#put()
will both immediately returnundefined
instead of performing their normal functions.