$cacheFactory.get()

get(cacheId); Get access to a cache object by the cacheId used when it was created. Parameters Param Type Details cacheId string Name or id of a cache to access. Returns object Cache object identified by the cacheId or undefined if no such cache.

$cacheFactory.Cache.removeAll()

removeAll(); Clears the cache object of any entries.

$cacheFactory.Cache.remove()

remove(key); Removes an entry from the Cache object. Parameters Param Type Details key string the key of the entry to be removed

$cacheFactory.Cache.put()

put(key, value); Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache. If behaving like an LRU cache, it will also remove stale entries from the set. It will not insert undefined values into the cache. Parameters Param Type Details key string the key under which the cached data is stored. value * the value to store alongside the key. If it is undefined, the key will not be stored.

$cacheFactory.Cache.info()

info(); Retrieve information regarding a particular Cache. Returns object an object with the following properties: id: the id of the cache instance size: the number of entries kept in the cache instance ...: any additional properties from the options object when creating the cache.

$cacheFactory.Cache.get()

get(key); Retrieves named data stored in the Cache object. Parameters Param Type Details key string the key of the data to be retrieved Returns * the value stored.

$cacheFactory.Cache.destroy()

destroy(); Destroys the Cache object entirely, removing it from the $cacheFactory set.

$cacheFactory.Cache

type in module ng A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data. angular.module('superCache') .factory('superCache', ['$cacheFactory', function($cacheFactory) { return $cacheFactory('super-cache'); }]); Example test: it('should behave like a cache', inject(function(superCache) { superCache.put('key', 'value'); superCache.put('another key', 'another value'); expect(superCache.info()).toEqual

$cacheFactory

service in module ng Factory that constructs Cache objects and gives access to them. var cache = $cacheFactory('cacheId'); expect($cacheFactory.get('cacheId')).toBe(cache); expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined(); cache.put("key", "value"); cache.put("another key", "another value"); // We've specified no options on creation expect(cache.info()).toEqual({id: 'cacheId', size: 2}); Usage $cacheFactory(cacheId, [options]); Arguments Param Type Details cacheId strin

$animateProvider.register()

register(name, factory); Registers a new injectable animation factory function. The factory function produces the animation object which contains callback functions for each event that is expected to be animated. eventFn: function(element, ... , doneFunction, options) The element to animate, the doneFunction and the options fed into the animation. Depending on the type of animation additional arguments will be injected into the animation function. The list below explains the function signatur