cache.invalidate(instance: Instance)
Drop the Instance from Roblox's userdata cache — next reference from Lua creates a fresh userdata.
lua
cache.invalidate(workspace.Part) print(workspace.Part == oldRef) --> false
cache.iscached(instance: Instance) → boolean
Whether the Instance has an entry in the userdata cache.
lua
print(cache.iscached(workspace.Part))
cache.replace(oldInstance: Instance, newInstance: Instance)
Point the cache slot for
oldInstance at newInstance.
lua
cache.replace(workspace.RealPart, workspace.FakePart) print(workspace.RealPart == workspace.FakePart) --> true