Yuari
Documentation
Docs/Cache/cache.invalidate

cache.invalidate

Invalidates cached data for an instance.

Syntax

cache.invalidate(instance?: Instance) -> nil

Parameters

ParameterTypeDescription
instance?InstanceThe Instance to read from or modify.

Returns

TypeDescription
nilThis function does not return a value.

Description

cache.invalidate is part of the Cache library. The module keeps a stable instance cache so userdata survives Roblox object churn. Cache calls inspect or change that mapping without modifying the game object itself.

The change is applied directly to the live target, so later reads observe the updated value.

Example

cache.invalidate(workspace)
print(cache.iscached(workspace))

Notes

  • Cache changes affect future lookups; existing userdata references remain valid.