Installation
Install Cache Manager in your Salesforce org.
Using Salesforce CLI
Deploy Source Code
bash
# Clone the repository
git clone https://github.com/beyond-the-cloud-dev/cache-manager.git
cd cache-manager
# Deploy to your org
sf project deploy start --target-org your-org-aliasManual Installation
Using Setup UI
- Navigate to Setup → Apex Classes
- Click New
- Copy the code from CacheManager.cls
- Save the class
Platform Cache Setup
For org and session cache, you need to set up Platform Cache partitions:
- Go to Setup → Platform Cache
- Create a partition named
Default - Allocate capacity for org and session cache
Dependencies
Cache Manager has zero code dependencies. It only requires Platform Cache be available in your org.
API Version
Requires Salesforce API version 57.0 or higher.
Verification
Test the installation:
apex
// Test transaction cache
CacheManager.ApexTransaction.put('test', 'value');
String value = (String) CacheManager.ApexTransaction.get('test');
System.assertEquals('value', value);
// Test org cache (requires Platform Cache setup)
CacheManager.DefaultOrgCache.put('test', 'value');
String orgValue = (String) CacheManager.DefaultOrgCache.get('test');
System.assertEquals('value', orgValue);If these work, you're all set! ✅
