cache.invalidate

Removes an instance from the native wrapper cache.

Syntax

Signature
cache.invalidate(Instance: Instance) -> ()

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
InstanceInstanceInstance reference to inspect.

Returns

TypeDescription
()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))