Skip to main content
Daniel Ballinger (Salesforce) 님이 Platform Cache에 글을 올렸습니다

The linked SFSE question covers the problem in more detail, but generally, if I'm in Apex and have a Cache.OrgPartition, how can I tell if it actually has any capacity to cache data without calling getCapactiy()?

 

I don't want to waste resources trying to cache things into an empty cache. Nor to I want to call the potentially expensive getCapacity() method when I'm trying to use the cache to avoid expensive operations.

How can I detect that a packaged Platform Cache Partition has no capacity allocated?

0/9000