---
schema_version: "1"
id: df4fbcb23b2e7e95902e5cc817f1dfd2d15100a6a7fce755ef06f7a5f5db503f
title: Use Custom Caches to Return Immutable Objects on Production Instances
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/rn_b2c_custom_cache_w10671394_je.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.rn_b2c_custom_cache_w10671394_je.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8776691b18e4203bc40c4bce615223999a5d2c327e49befaa7caac9cdfe8a15e
description: Custom caches are designed to return immutable copies of the original objects stored in the cache. Previously, edge cases existed where objects and arrays in custom caches could be modified. This issue has been fixed.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Use Custom Caches to Return Immutable Objects on Production Instances

Custom caches are designed to return immutable copies of the original objects stored in the cache. Previously, edge cases existed where objects and arrays in custom caches could be modified. This issue has been fixed.

When: This change becomes effective with the B2C Commerce 22.3 release, and applies to all production instances. Previously, with the 22.1 release, this change was made for all sandbox, development, and staging instances.

How: If you don’t use custom caches or use custom caches in the intended and documented way, no action is required. In the rare case that you use custom caches with code that performs an operation to modify the state of an object returned by custom cashes, a code change is required to avoid a failure exception, when calling the affected operation.