Replace the implementation for a given factory, such that future calls to
$(factory) will call or construct the replacement instead.
If the replacement is omitted, null, or undefined, future calls will
invoke the original factory again.
(Note: in all cases the replacement will not take effect if there's
already a cached singleton, so you may wish to call
$cache.unset() to ensure a future call is actually executed.)
Replace the implementation for a given factory, such that future calls to
$(factory)will call or construct the replacement instead.If the replacement is omitted, null, or undefined, future calls will invoke the original factory again.
(Note: in all cases the replacement will not take effect if there's already a cached singleton, so you may wish to call $cache.unset() to ensure a future call is actually executed.)