Platform Cache

Caching information is not a new concept and is available on many other platforms, for example, MemCache is a popular open source framework for providing a cache facility. The main motivation for considering caching is performance.

As mentioned earlier, state is not retained between requests. You may find that common information needs to be constantly queried or calculated. If the chances of such information changing are low, caches can be considered to gain a performance benefit. The cost, in terms of Apex execution (CPU Governor) and/or database queries (SOQL and Row Governors) has to be less than retrieving it from the cache.

Salesforce recommends the use of the System.currentTimeMillis method to output debug statements ...

Get Salesforce Lightning Platform Enterprise Architecture - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.