Syntax
cache.invalidate(instance: Instance)Arguments
| Name | Type | Description |
|---|---|---|
instance | Instance | Instance whose cache entry should be removed. |
Description
Removes the cached Instance entry for the given Instance.
Call it with 1 parameter(s): instance. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Remove an Instance from Real's cache and check whether the cache entry is still present.
local Players = game:GetService("Players")
cache.invalidate(Players)
print(cache.iscached(Players))