Points the cache entry for one instance at another, so code that resolves the first object receives the replacement instead. A targeted version of cache.invalidate when you want to redirect rather than drop.

Parameters

Instance
required
The instance being replaced.
Instance
required
The instance to put in its place.

Example

Errors