getinstancecache Synchronous
Read the ObjectBridge cache table that maps native Instance identities to their canonical Luau wrappers. This is mainly useful for diagnosing wrapper caching.
Luau
getinstancecache() -> TableParameters
This function takes no arguments.
Returns
TableThe runtime cache table. Its keys are internal identities rather than ordinary Instance objects.
Usage notes
Treat this as an inspection aid. Use cache.iscached, cache.replace, and cache.invalidate for the supported wrapper operations.
Example
Luau
local cacheSnapshot = getinstancecache()
local entries = 0
for _ in pairs(cacheSnapshot) do entries += 1 end
print("Cached wrappers:", entries)