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.

Syntax
Luau
getinstancecache() -> Table

Parameters

This function takes no arguments.

Returns

Table

The 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

Example
Luau
local cacheSnapshot = getinstancecache()
local entries = 0
for _ in pairs(cacheSnapshot) do entries += 1 end
print("Cached wrappers:", entries)
Kawaii documentation