> ## 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.replace

> Sets the cached Instance entry for one Instance to another Instance.

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

  ## Argumenty

  <ParamField path={"instance"} type={"Instance"} required>
    Instance whose Instance cache entry should be replaced.
  </ParamField>

  <ParamField path={"replacement"} type={"Instance"} required>
    Instance value to store in the cache entry for the first argument.
  </ParamField>

  ## Przykład

  Zapisz jedna Instance jako wpis Instance cache dla innej Instance.

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

  cache.replace(Players, ReplicatedStorage)

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