A developer wants to improve runtime performance of Apex calls by caching results on the client. What is the most efficient way to implement this and follow best practices?
A. Decorate the server-side method with @AuraEnabled(storable=true).
B. Set a cookie in the browser for use upon return to the page.
C. Call the setStorable() method on the action in the JavaScript client-side code.
D. Decorate the server-side method with @AuraEnabled(cacheable=true).
Suggest answer: D
Reference:
No comments:
Please share to make the community better.