> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# cache.invalidate

> 移除给定 Instance 的已缓存 Instance cache 条目。

<div className="real-function-page">
  ```lua theme={null}
  cache.invalidate(instance: Instance)
  ```

  ## 参数

  <ParamField path={"instance"} type={"Instance"} required>
    应移除其已缓存 registry 条目的 Instance。
  </ParamField>

  ## 示例

  从 Real 的 cache 中移除一个 Instance，并检查 cache 条目是否仍然存在。

  ```lua theme={null}
  local Players = game:GetService("Players")

  cache.invalidate(Players)

  print(cache.iscached(Players))
  ```
</div>
