Syntax
cache.iscached(instance: Instance): booleanArguments
| Name | Type | Description |
|---|---|---|
instance | Instance | Instance whose Instance cache entry should be checked. |
Returns
| Name | Type | Description |
|---|---|---|
cached | boolean | True when the cache contains a non-nil entry for the Instance. |
Description
Returns whether the given Instance has a non-nil entry in the Instance cache.
Call it with 1 parameter(s): instance. The argument table explains which values are required and which ones only refine the behavior.
It returns cached (boolean). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Check whether an Instance currently has an entry in Real's Instance cache.
local Players = game:GetService("Players")
local cached = cache.iscached(Players)
print(cached)
cache.invalidate(Players)
print(cache.iscached(Players))