---
title: "cache.validate"
description: "Adds the supplied wrapper to the cache if no entry exists."
---

```lua
cache.validate(instance: Instance): boolean
```

---

## Aliases

None.

---

## Arguments

<ParamField body="instance" type="Instance" required>
  The Roblox Instance to operate on.
</ParamField>

---

## Returns

<ResponseField name="valid" type="boolean">
  True when a usable native pointer is present and its wrapper is cached.
</ResponseField>

Returns false for an unresolved native pointer; true when a usable pointer is present. Does not replace an existing entry.

---

## Example

```lua
local part = Instance.new("Part")
print(cache.validate(part))
part:Destroy()
```
