Skip to content
Saiko

cache.invalidate

Removes an instance from the engine's instance cache. The reference you hold is no longer the one the engine hands out: asking the game for the same instance again gives a different reference, and the two do not compare equal.

Signature

luau
cache.invalidate(instance: Instance): ()

Parameters

instanceInstance

The instance to drop from the cache.

Returns

Nothing.

Note

Example

luau
local service = game:GetService("BadgeService")

cache.invalidate(service)

print(service == game:GetService("BadgeService")) --> false
print(typeof(service)) --> Instance