cache.iscached
Tests whether an Instance has a cached Luau reference.
Syntax
cache.iscached(object: Instance) -> boolean
Also available as
is_cached
Parameters
| Parameter | Type | Description |
|---|---|---|
object | Instance | Instance to inspect. |
Returns
| Type | Description |
|---|---|
boolean | Whether a cached reference exists. |
Description
The cache stores references, not a list of all living game objects. A false result does not mean the Instance was destroyed. Another engine lookup can repopulate the cache.
Example
local folder = Instance.new("Folder")
print(cache.iscached(folder))
folder:Destroy()
These are Game executor contracts. Check build requirements and session lifetimes before using them.
