cache.invalidate
Removes an instance from the native wrapper cache.
Syntax
Signature
cache.invalidate(Instance: Instance) -> ()Aliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Instance | Instance | Instance reference to inspect. |
Returns
| Type | Description |
|---|---|
() | None. |
Notes
Existing references stay usable and a later engine lookup may create another wrapper. The native cache must be available and writable.
Example
Luau
local Players = game:GetService("Players")
cache.invalidate(Players)
local Refreshed = game:GetService("Players")
assert(compareinstances(Players, Refreshed))