nerdexam
Salesforce

PDII · Question #8

A developer wishes to improve runtime performance of Apex calls by caching results on the client. What is the best way to implement this?

The correct answer is A. Decorate the server-side method with @AuraEnabled(cacheable=true). See the full explanation below for the reasoning.

Question

A developer wishes to improve runtime performance of Apex calls by caching results on the client. What is the best way to implement this?

Options

  • ADecorate the server-side method with @AuraEnabled(cacheable=true).
  • BSet a cookie in the browser for use upon return to the page.
  • CCall the setStorable() method on the action in the JavaScript client-side code.
  • DDecorate the server-side method with @AuraEnabled(storable=true).

How the community answered

(35 responses)
  • A
    83% (29)
  • B
    9% (3)
  • C
    6% (2)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full PDII Practice