Cache

cache.iscached

返回实例当前是否具有缓存的注册表引用。

语法

cache.iscached(instance: Instance): boolean

参数

名称类型描述
instanceInstance要检查或更新的 Roblox 实例。

返回值

名称类型描述
cachedboolean当实例当前有缓存的引用时为 true。

说明

返回实例当前是否具有缓存的注册表引用。

使用 1 个参数调用: instance。参数表会说明哪些值必填,哪些值只用于细化行为。

返回 cached (boolean)。使用返回表区分成功值、nil 结果和可恢复错误。

示例

使用占位值的示例调用。

local result = cache.iscached(game)
print(result)