GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jongpie/NebulaCacheManager: A flexible cache management system for Salesforce Apex developers. Built to be scalable & configurable.

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.husky
.husky
 
 
config
config
 
 
images
images
 
 
nebula-cache-manager
nebula-cache-manager
 
 
scripts/build
scripts/build
 
 
.eslintignore
.eslintignore
 
 
.forceignore
.forceignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
lint-staged.config.js
lint-staged.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
sfdx-project.json
sfdx-project.json
 
 

Repository files navigation

Nebula Cache Manager

A flexible cache management system for Salesforce Apex developers. Built to be scalable & configurable.

Learn more about the history & implementation of this repo in the Joys of Apex article 'Iteratively Building a Flexible Caching System for Apex'

Unlocked Package - Nebula Namespace - v1.0.2

Install Unlocked Package (Nebula namespace) in a Sandbox Install Unlocked Package (Nebula namespace) in Production

Unlocked Package - No Namespace - v1.0.2

Install Unlocked Package (no namespace) in a Sandbox Install Unlocked Package (no namespace) in Production


Cache Manager for Apex: Quick Start

For Apex developers, the CacheManager class has several methods that can be used to cache data in 1 of the 3 supported cache types - transaction, organization platform cache, and session platform cache. Each cache type implements the interface CacheManager.Cacheable - regardless of which cache type you choose, the way you interact with each cache type is consistent.

// This will cache a Map<String, Group> that contains all queues in the current org (if the data has not been cached)
// or it will return the cached version of the data (if the data has previously been cached)
public static Map<String, Group> getQueues() {
    String cacheKey = 'queues';
    Map<String, Group> queueDeveloperNameToQueueGroup;
    if (CacheManager.getOrganization().contains(cacheKey)) {
        queueDeveloperNameToQueueGroup = (Map<String, Group>) CacheManager.getOrganization().get(cacheKey);
    } else {
        queueDeveloperNameToQueueGroup = new Map<String, Group>();
        for (Group queueGroup : [SELECT Id, DeveloperName, Email, Name FROM Group WHERE Type = 'Queue']) {
            queueDeveloperNameToQueueGroup.put(queueGroup.DeveloperName, queueGroup);
        }
        CacheManager.getOrganization().put(cacheKey, queueDeveloperNameToQueueGroup);
    }
    return queueDeveloperNameToQueueGroup;
}

About

A flexible cache management system for Salesforce Apex developers. Built to be scalable & configurable.

Topics

apexcachingsalesforcesalesforce-adminssalesforce-cachesalesforce-developers

Resources

Readme
MIT license
Activity

Stars

32 stars

Watchers

3 watching

Forks

6 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.