cache.iscached
Checks if an instance is in the reference cache.
Syntax
cache.iscached(instance: Instance) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
instance | Instance | The instance to check |
Returns
| Type | Description |
|---|---|
boolean | True if the instance is cached |
Description
cache.iscached checks whether an instance currently exists in the reference cache.
Example
local part = workspace.Part
if cache.iscached(part) then
print("Part is cached")
else
print("Part is not cached")
end
-- After invalidation
cache.invalidate(part)
print(cache.iscached(part)) -- falseRelated Functions
cache.replace- Replace cached instancecache.invalidate- Remove from cache