cache.replace
Replaces the cache entry of one instance with another instance. Afterwards the first reference no longer compares equal to the second, nor to a fresh reference to the second instance.
Signature
cache.replace(instance: Instance, with: Instance): ()Parameters
instanceInstanceThe instance whose cache entry is replaced.
withInstanceThe instance that takes its place.
Returns
Nothing.
Note
Example
local a = game:GetService("BadgeService")
local b = game:GetService("Stats")
cache.replace(a, b)
print(a == b) --> false
print(a == game:GetService("Stats")) --> false