10

I was exploring few bits using tooling API, and stumbled upon 2 endpoints that got my attention.

They are

/services/data/v45.0/tooling/apexCache

and

/services/data/v45.0/tooling/apexCacheWarmer

I tried searching for them in Tooling API Guide and Tooling Object Reference but found no success. Can someone point what's the use of those?

enter image description here

3

If you cast your mind back to Dreamforce 2016 Josh Kaplan did a talk on the new (at the time) apex compiler. See Peek Under the Hood of the New Apex Compiler.

It included details on how compiled apex is cached for use on the app servers. enter image description here

ApexCache and ApexCacheWarmer are almost certainly related to that functionality.


I checked with Chris Peterson. Further details:

  • They are scratch org specific. At least in terms of being exposed by the API.
  • They are used by the SFDX test run command to tell if apex is compiled and/or cached. This is taken into account for how long the tests take to run.
  • The documentation is coming in the future.
  • Top Man. They are scratch org specific. interesting I got them in prod and sandbox as well. I thought it is cached apex code for Future/Queuable/Batch to make sure when batch is executing during deployment, they finish in the old version of apex code. Thanks – Pranay Jaiswal Jul 19 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.