1

We have a package (second generation) which has a platform cache partition. The current code of this partition is like:

<?xml version="1.0" encoding="UTF-8"?>
<PlatformCachePartition xmlns="http://soap.sforce.com/2006/04/metadata">
    <description>descr...</description>
    <isDefaultPartition>false</isDefaultPartition>
    <masterLabel>MyPartition</masterLabel>
    <platformCachePartitionTypes>
        <allocatedCapacity>0</allocatedCapacity>
        <allocatedPurchasedCapacity>0</allocatedPurchasedCapacity>
        <allocatedTrialCapacity>0</allocatedTrialCapacity>
        <cacheType>Organization</cacheType>
    </platformCachePartitionTypes>
    <platformCachePartitionTypes>
        **<allocatedCapacity>3</allocatedCapacity>**
        <allocatedPurchasedCapacity>0</allocatedPurchasedCapacity>
        <allocatedTrialCapacity>0</allocatedTrialCapacity>
        <cacheType>Session</cacheType>
    </platformCachePartitionTypes>
</PlatformCachePartition>

The problem we are facing is when we install the package in our sandboxes the allocatedCapacity value is 0 instead of 3.

When I deploy the code to a scratch org it works perfectly.

Any thoughts?

  • 4
    Does your Sandbox have any capacity? Does Production? You can't get cache "for free," it has to already be there. The Scratch Org Definition allows you to emulate an org that has this feature, but you won't be able to use that package in an org without sufficient cache. – sfdcfox Aug 26 '19 at 8:33
  • Yes have in production and sandboxed. The workaround was change the PlatformCachePartition manually – Diéffrei Quadros Aug 26 '19 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.