Presentation held at CzechDreamin' 2019 (August 16, 2019), showing a sample implementation that uses an Org Cache Partition to optimize database read operations of Apex code through the cache.
Session Abstract: "For Web Applications, caching is a common strategy to improve perfomance and reliability. Yet, it’s a lesser known feature that there is “Platform Cache” as a built-in mechanism for Salesforce developers to add to their app design. Leveraging the Platform Cache can reduce your SOQL queries for certain types of data and can cut the retrieval time for data to just a few Milliseconds, which can effectively make access to frequently used data up to 100x faster.
I’ll discuss how to use the platform cache, the improvement you can expect from using the platform cache and the limits it has."
The Repo contains prepared sample data, user setup etc. Install it into a scratch org by checking out the repo by running
git clone github.com/dstdia/PlatformCache
The repo contains a setup script that creates a scratch org, assigns permissions, and prepares sample data. For Mac, Unix, Linux, run the following command from the command line:
./createScratch.sh
For Windows, run the following from Powershell:
./createScratch.ps1
If you want to contribute, I'm happy to review your pull requests. If you have found an issue, please use the [https://github.com/dstdia/PlatformCache/issues](Issue tracker in this repo)
- Developer Documentation: bit.ly/cachedoc
- Trailhead: bit.ly/cachetrail