Syntax
cache.replace(source: Instance, replacement: Instance)Arguments
| Name | Type | Description |
|---|---|---|
source | Instance | The instance whose reference is to be replaced. |
replacement | Instance | The replacement value for the instance's reference. |
Description
Replaces the cached registry reference for one instance with another instance reference.
Call it with 2 parameter(s): source, replacement. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Example call with placeholder values.
cache.replace(game, game)