Skip to content
Object cacheOverview

cache.invalidate

Invalidates a cached object reference.

Details#

Removes the cached wrapper for an Instance without destroying the underlying object. Existing references remain usable. Requires a valid Instance and an available object cache; returns no values.

Examples#

Example

Luau
local part = Instance.new("Part")
cache.invalidate(part)
print(part.ClassName) -- Part
part:Destroy()