SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Maximize your Apex Performance
with Platform Cache
Dreamforce 2018
Adam Olshansky
513 14X
Adam Olshansky
Salesforce Developer,
@adam17amo
adam@adamtoarchitect.com
bit.ly/lightningmigration
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the
assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we
make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber
growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any
statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new
products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays
in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the
immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new
releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger
enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form
10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important
disclosures are available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be
delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Statement under the Private Securities Litigation Reform Act of 1995
Forward-Looking Statement
Agenda
What is a Cache?
What is Salesforce Platform Cache?
Before/After Feature Comparison
CacheBuilder Interface
Considerations
Summary and Next Steps
Don’t have to search every time!
Easily accessible when needed
Squirrels have the right idea
Cache
Previous Caching Options
Custom setting
sObjects
Inflexible
Useful but limited
Salesforce Platform Cache
Salesforce shares the wealth!
Benefits
Why do we care?
Benefits
Why do we care?
Salesforce Platform Cache
Org Cache
•  Global values for all users
•  Exists for up to 48 hours
One for All
Salesforce Platform Cache
Everyone is a snowflake
Session Cache
•  Specific to user sessions
•  Expires in 8 hours or if session ends
Salesforce Platform Cache
Multiple Options
Org Cache Session Cache
Values Same for all users Unique for each user
Default Expiration 48 hours 8 hours
Persistence Continuous Expires at end of session
Use Cases Transit schedule,
Top sales rankings
Current user’s shopping cart,
Distance from user’s location to
set of customers
Salesforce Platform Cache
Piece of the pie
Salesforce Platform Cache
Setup Menu
Create New Partition
Specify Session and Org Cache amounts
Increments of 5MB
Point-and-click
Use Case
Want to get Top 10 by Annual Revenue
Want to get number of VIP Accounts in each region (7 regions)
Demo
Top Accounts
Regional Accounts
Watch the Magic Happen!
How It Works
Peek behind the curtain
How It Works
Cache is a Map
Key is {!PartitionName +
KeyName}
Value is value you want to
cache
Set the partition as a variable
Use keyname to get value
Cast to data type
If value isn’t in cache, it’s null
Just a Map
Under the Hood
See my storage
Salesforce Platform Cache
CacheBuilder Interface
Uses 1 method with 1 parameter
Use the class and key to request
Interface checks if value is cached
if cached
•  return value
else
•  calculate, cache, and return
Make Salesforce do the work for you
CacheBuilder Diagnostics
Cache Considerations
Cache Considerations
Keep in mind
Cache isn’t persisted so there could be data loss
Cache is always invalidated when Apex classes change
Need to handle Cache misses
Session cache lasts up to 8 hours
Org cache lasts up to 48 hours
30 MB is 30 MB
Summary
Summary
Cache refers to part of memory where complex values can be accessed later quickly
Platform Cache can massively improve Apex Performance time
Can store values for a single session or for the entire org
No constraints on data type (If you can cast it, you can cache it!)
Need to handle misses and periodically update cache
CacheBuilder interface provided to simplify some of the process
What we learned
Trailhead Badges
Platform Cache Basics Large Data Volumes
Resources
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/
apex_cache_namespace_overview.htm
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/
apex_namespace_cache.htm
https://developer.salesforce.com/blogs/engineering/2015/05/platform-cache.html
Find out more
Maximize Apex Performance with Platform Cache

Weitere ähnliche Inhalte

Was ist angesagt?

Deep Dive Into World Of Pre Sales By Rupesh Bhatia
Deep Dive Into World Of Pre Sales By Rupesh BhatiaDeep Dive Into World Of Pre Sales By Rupesh Bhatia
Deep Dive Into World Of Pre Sales By Rupesh BhatiaBLRDEVX
 
Common Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCommon Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCloud Analogy
 
SAP Performance Testing Using LoadRunner
SAP Performance Testing Using LoadRunnerSAP Performance Testing Using LoadRunner
SAP Performance Testing Using LoadRunnerKumar Gupta
 
Sap S/4 HANA New Implementation
Sap S/4 HANA New ImplementationSap S/4 HANA New Implementation
Sap S/4 HANA New ImplementationSoumya De
 
The Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringThe Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringVanessa Turke
 
Confluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAConfluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAconfluent
 
Ultimate Guide to Quote to Cash
Ultimate Guide to Quote to Cash Ultimate Guide to Quote to Cash
Ultimate Guide to Quote to Cash stephan PEIFFER
 
OpenText Extended ECM for SAP SuccessFactors
OpenText Extended ECM for SAP SuccessFactorsOpenText Extended ECM for SAP SuccessFactors
OpenText Extended ECM for SAP SuccessFactorsJonathan Beardsley
 
Understanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoUnderstanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoSalesforce Developers
 
Partner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - AprilPartner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - Aprilconfluent
 
Salesforce CPQ Quote it Fast, Sell it Right
Salesforce CPQ Quote it Fast, Sell it RightSalesforce CPQ Quote it Fast, Sell it Right
Salesforce CPQ Quote it Fast, Sell it RightCloud Analogy
 
Automate user creation using sap gui scripting
Automate user creation using sap gui scriptingAutomate user creation using sap gui scripting
Automate user creation using sap gui scriptingsparten369
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityJean-Paul Azar
 
Developer group introduction & Salesforce overview
Developer group introduction & Salesforce overviewDeveloper group introduction & Salesforce overview
Developer group introduction & Salesforce overviewSujesh Ramachandran
 
Roadmap to SAP S/4HANA
Roadmap to SAP S/4HANARoadmap to SAP S/4HANA
Roadmap to SAP S/4HANAAbsoft Limited
 
Rise with sap one pager
Rise with sap one pagerRise with sap one pager
Rise with sap one pagerBappiBiswas
 
Solution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - ConfigurationSolution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - ConfigurationLinh Nguyen
 

Was ist angesagt? (20)

Deep Dive Into World Of Pre Sales By Rupesh Bhatia
Deep Dive Into World Of Pre Sales By Rupesh BhatiaDeep Dive Into World Of Pre Sales By Rupesh Bhatia
Deep Dive Into World Of Pre Sales By Rupesh Bhatia
 
Common Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCommon Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation Challenges
 
SAP Performance Testing Using LoadRunner
SAP Performance Testing Using LoadRunnerSAP Performance Testing Using LoadRunner
SAP Performance Testing Using LoadRunner
 
Sap S/4 HANA New Implementation
Sap S/4 HANA New ImplementationSap S/4 HANA New Implementation
Sap S/4 HANA New Implementation
 
Salesforce CPQ
Salesforce CPQSalesforce CPQ
Salesforce CPQ
 
The Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringThe Art and Science of Requirements Gathering
The Art and Science of Requirements Gathering
 
Confluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAConfluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVA
 
Ultimate Guide to Quote to Cash
Ultimate Guide to Quote to Cash Ultimate Guide to Quote to Cash
Ultimate Guide to Quote to Cash
 
OpenText Extended ECM for SAP SuccessFactors
OpenText Extended ECM for SAP SuccessFactorsOpenText Extended ECM for SAP SuccessFactors
OpenText Extended ECM for SAP SuccessFactors
 
Understanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoUnderstanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We Do
 
Partner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - AprilPartner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - April
 
Salesforce CPQ Quote it Fast, Sell it Right
Salesforce CPQ Quote it Fast, Sell it RightSalesforce CPQ Quote it Fast, Sell it Right
Salesforce CPQ Quote it Fast, Sell it Right
 
Automate user creation using sap gui scripting
Automate user creation using sap gui scriptingAutomate user creation using sap gui scripting
Automate user creation using sap gui scripting
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka Security
 
Sap activate overview
Sap activate overviewSap activate overview
Sap activate overview
 
Asap methodology
Asap methodologyAsap methodology
Asap methodology
 
Developer group introduction & Salesforce overview
Developer group introduction & Salesforce overviewDeveloper group introduction & Salesforce overview
Developer group introduction & Salesforce overview
 
Roadmap to SAP S/4HANA
Roadmap to SAP S/4HANARoadmap to SAP S/4HANA
Roadmap to SAP S/4HANA
 
Rise with sap one pager
Rise with sap one pagerRise with sap one pager
Rise with sap one pager
 
Solution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - ConfigurationSolution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - Configuration
 

Ähnlich wie Maximize Apex Performance with Platform Cache

A Developer's Guide To Building Great Salesforce Consoles
A Developer's Guide To Building Great Salesforce ConsolesA Developer's Guide To Building Great Salesforce Consoles
A Developer's Guide To Building Great Salesforce ConsolesEnzhen Huang
 
Build custom user interfaces for your Salesforce data with the UI API
 Build custom user interfaces for your Salesforce data with the UI API Build custom user interfaces for your Salesforce data with the UI API
Build custom user interfaces for your Salesforce data with the UI APISalesforce Developers
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforceMark Adcock
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackCarolEnLaNube
 
PHP and Rails with AppExchange
PHP and Rails with AppExchangePHP and Rails with AppExchange
PHP and Rails with AppExchangedreamforce2006
 
Design Patterns for Asynchronous Apex
Design Patterns for Asynchronous ApexDesign Patterns for Asynchronous Apex
Design Patterns for Asynchronous ApexSalesforce Developers
 
Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Salesforce Partners
 
Dreamforce Web Portals
Dreamforce Web PortalsDreamforce Web Portals
Dreamforce Web Portalsgokubi
 
Singapore dg salesforce einstein + spring 17 release by manish
Singapore dg   salesforce einstein + spring 17 release by manishSingapore dg   salesforce einstein + spring 17 release by manish
Singapore dg salesforce einstein + spring 17 release by manishManish Thaduri
 
Salesforce for Admins Keynote - Dreamforce 2016
Salesforce for Admins Keynote - Dreamforce 2016Salesforce for Admins Keynote - Dreamforce 2016
Salesforce for Admins Keynote - Dreamforce 2016Salesforce Admins
 
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow TemplatesFremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow TemplatesJayant Jindal
 
sf tools from community
sf tools from communitysf tools from community
sf tools from communityDurgesh Dhoot
 
Introduction to lightning out df16
Introduction to lightning out   df16Introduction to lightning out   df16
Introduction to lightning out df16Mohith Shrivastava
 
Introduction to MuleSoft Anytime Platform
Introduction to MuleSoft Anytime PlatformIntroduction to MuleSoft Anytime Platform
Introduction to MuleSoft Anytime PlatformSalesforce Developers
 
2016 ISBG - Salesforce App Cloud and Domino - same same, but different
2016 ISBG - Salesforce App Cloud and Domino - same same, but different2016 ISBG - Salesforce App Cloud and Domino - same same, but different
2016 ISBG - Salesforce App Cloud and Domino - same same, but differentRené Winkelmeyer
 
Salesforce DX for admins - Sydney world tour
Salesforce DX for admins - Sydney world tourSalesforce DX for admins - Sydney world tour
Salesforce DX for admins - Sydney world tourTechforce Services
 
Apply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsApply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsPeter Chittum
 
Get ready for your platform developer i certification webinar
Get ready for your platform developer i certification   webinarGet ready for your platform developer i certification   webinar
Get ready for your platform developer i certification webinarJackGuo20
 

Ähnlich wie Maximize Apex Performance with Platform Cache (20)

A Developer's Guide To Building Great Salesforce Consoles
A Developer's Guide To Building Great Salesforce ConsolesA Developer's Guide To Building Great Salesforce Consoles
A Developer's Guide To Building Great Salesforce Consoles
 
Build custom user interfaces for your Salesforce data with the UI API
 Build custom user interfaces for your Salesforce data with the UI API Build custom user interfaces for your Salesforce data with the UI API
Build custom user interfaces for your Salesforce data with the UI API
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance Track
 
PHP and Rails with AppExchange
PHP and Rails with AppExchangePHP and Rails with AppExchange
PHP and Rails with AppExchange
 
Design Patterns for Asynchronous Apex
Design Patterns for Asynchronous ApexDesign Patterns for Asynchronous Apex
Design Patterns for Asynchronous Apex
 
Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)
 
Dreamforce Web Portals
Dreamforce Web PortalsDreamforce Web Portals
Dreamforce Web Portals
 
Singapore dg salesforce einstein + spring 17 release by manish
Singapore dg   salesforce einstein + spring 17 release by manishSingapore dg   salesforce einstein + spring 17 release by manish
Singapore dg salesforce einstein + spring 17 release by manish
 
Salesforce for Admins Keynote - Dreamforce 2016
Salesforce for Admins Keynote - Dreamforce 2016Salesforce for Admins Keynote - Dreamforce 2016
Salesforce for Admins Keynote - Dreamforce 2016
 
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow TemplatesFremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
Fremont Salesforce Community Group - Salesforce Labs Day - Flow Templates
 
sf tools from community
sf tools from communitysf tools from community
sf tools from community
 
Introduction to lightning out df16
Introduction to lightning out   df16Introduction to lightning out   df16
Introduction to lightning out df16
 
Introduction to MuleSoft Anytime Platform
Introduction to MuleSoft Anytime PlatformIntroduction to MuleSoft Anytime Platform
Introduction to MuleSoft Anytime Platform
 
2016 ISBG - Salesforce App Cloud and Domino - same same, but different
2016 ISBG - Salesforce App Cloud and Domino - same same, but different2016 ISBG - Salesforce App Cloud and Domino - same same, but different
2016 ISBG - Salesforce App Cloud and Domino - same same, but different
 
Salesforce DX for admins - Sydney world tour
Salesforce DX for admins - Sydney world tourSalesforce DX for admins - Sydney world tour
Salesforce DX for admins - Sydney world tour
 
Apply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsApply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday Problems
 
Get ready for your platform developer i certification webinar
Get ready for your platform developer i certification   webinarGet ready for your platform developer i certification   webinar
Get ready for your platform developer i certification webinar
 

Mehr von Adam Olshansky

Apex Testing Deep Dive
Apex Testing Deep DiveApex Testing Deep Dive
Apex Testing Deep DiveAdam Olshansky
 
Lightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's GuideLightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's GuideAdam Olshansky
 
Demystifying Code for Admins: The Last Step to Apex
Demystifying Code for Admins: The Last Step to ApexDemystifying Code for Admins: The Last Step to Apex
Demystifying Code for Admins: The Last Step to ApexAdam Olshansky
 
Force Academy LA Trigger Framework
Force Academy LA Trigger FrameworkForce Academy LA Trigger Framework
Force Academy LA Trigger FrameworkAdam Olshansky
 
Write Generic Code with the Tooling API
Write Generic Code with the Tooling APIWrite Generic Code with the Tooling API
Write Generic Code with the Tooling APIAdam Olshansky
 
Punta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling ApiPunta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling ApiAdam Olshansky
 
Phx User Group Salesforce Connect
Phx User Group Salesforce ConnectPhx User Group Salesforce Connect
Phx User Group Salesforce ConnectAdam Olshansky
 

Mehr von Adam Olshansky (8)

Apex Testing Deep Dive
Apex Testing Deep DiveApex Testing Deep Dive
Apex Testing Deep Dive
 
Lightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's GuideLightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's Guide
 
Demystifying Code for Admins: The Last Step to Apex
Demystifying Code for Admins: The Last Step to ApexDemystifying Code for Admins: The Last Step to Apex
Demystifying Code for Admins: The Last Step to Apex
 
Force Academy LA Trigger Framework
Force Academy LA Trigger FrameworkForce Academy LA Trigger Framework
Force Academy LA Trigger Framework
 
Write Generic Code with the Tooling API
Write Generic Code with the Tooling APIWrite Generic Code with the Tooling API
Write Generic Code with the Tooling API
 
Blaze Your Trail
Blaze Your TrailBlaze Your Trail
Blaze Your Trail
 
Punta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling ApiPunta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling Api
 
Phx User Group Salesforce Connect
Phx User Group Salesforce ConnectPhx User Group Salesforce Connect
Phx User Group Salesforce Connect
 

Kürzlich hochgeladen

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 

Kürzlich hochgeladen (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 

Maximize Apex Performance with Platform Cache

  • 1. Maximize your Apex Performance with Platform Cache Dreamforce 2018 Adam Olshansky
  • 2. 513 14X Adam Olshansky Salesforce Developer, @adam17amo adam@adamtoarchitect.com bit.ly/lightningmigration
  • 3. This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Statement under the Private Securities Litigation Reform Act of 1995 Forward-Looking Statement
  • 4. Agenda What is a Cache? What is Salesforce Platform Cache? Before/After Feature Comparison CacheBuilder Interface Considerations Summary and Next Steps
  • 5. Don’t have to search every time! Easily accessible when needed Squirrels have the right idea Cache
  • 6. Previous Caching Options Custom setting sObjects Inflexible Useful but limited
  • 10. Salesforce Platform Cache Org Cache •  Global values for all users •  Exists for up to 48 hours One for All
  • 11. Salesforce Platform Cache Everyone is a snowflake Session Cache •  Specific to user sessions •  Expires in 8 hours or if session ends
  • 12. Salesforce Platform Cache Multiple Options Org Cache Session Cache Values Same for all users Unique for each user Default Expiration 48 hours 8 hours Persistence Continuous Expires at end of session Use Cases Transit schedule, Top sales rankings Current user’s shopping cart, Distance from user’s location to set of customers
  • 15. Create New Partition Specify Session and Org Cache amounts Increments of 5MB Point-and-click
  • 16. Use Case Want to get Top 10 by Annual Revenue Want to get number of VIP Accounts in each region (7 regions)
  • 18. How It Works Peek behind the curtain
  • 19. How It Works Cache is a Map Key is {!PartitionName + KeyName} Value is value you want to cache Set the partition as a variable Use keyname to get value Cast to data type If value isn’t in cache, it’s null Just a Map
  • 20.
  • 21. Under the Hood See my storage
  • 23. CacheBuilder Interface Uses 1 method with 1 parameter Use the class and key to request Interface checks if value is cached if cached •  return value else •  calculate, cache, and return Make Salesforce do the work for you
  • 24.
  • 27. Cache Considerations Keep in mind Cache isn’t persisted so there could be data loss Cache is always invalidated when Apex classes change Need to handle Cache misses Session cache lasts up to 8 hours Org cache lasts up to 48 hours 30 MB is 30 MB
  • 29. Summary Cache refers to part of memory where complex values can be accessed later quickly Platform Cache can massively improve Apex Performance time Can store values for a single session or for the entire org No constraints on data type (If you can cast it, you can cache it!) Need to handle misses and periodically update cache CacheBuilder interface provided to simplify some of the process What we learned
  • 30. Trailhead Badges Platform Cache Basics Large Data Volumes