---
schema_version: "1"
id: 48002b4c1d66c84528e6184ccfdbbc440a9bbc5a7d6d033326661195a68204c6
title: Use Custom Caches to Return Immutable Objects
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_w10224592_je.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.rn_b2c_custom_cache_w10224592_je.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 99b31a22af61c9da83ec1daee32319cd5fca3ab0b125e599b17e85fc9750a3f5
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

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.1 release, and applies to all sandbox, development, and staging instances. Production instances are activated in a later release.

How: If you don’t use custom caches or use custom caches in the intended and documented way, you don’t need to take action. 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.