Certified Platform Developer II Exam QuestionsBrowse all questions from this exam

Certified Platform Developer II Exam - Question 14


A developer wishes to improve runtime performance of Apex calls by caching results on the client.

What is the best way to implement this?

Show Answer
Correct Answer: AC

To improve runtime performance and cache results on the client, the best approach is to use the @AuraEnabled(cacheable=true) annotation on the server-side method. This annotation specifies that the method results can be cached on the client, eliminating the need for additional JavaScript code to handle caching.

Discussion

12 comments
Sign in to comment
Rocky_sfdcOption: A
Jan 22, 2021

A is correct .... after API version 44 not need of declaring at client side .

NiuNiuGOption: C
Jan 24, 2021

Prior to Winter ’19, to cache data returned from an Apex method, you had to call setStorable() in JavaScript code on every action that called the Apex method. Now you can mark the Apex method as storable (cacheable) and get rid of any setStorable() calls in JavaScript code.

amerbearatOption: A
Aug 13, 2021

Ans: A To improve runtime performance, set @AuraEnabled(cacheable=true) to cache the method results on the client.

MetaLojiqTeeOption: A
Jul 27, 2023

A is correct

CaiXiDanOption: A
Jul 5, 2022

A is the correct answer

levianOption: A
Sep 29, 2022

A is the ans

chenxinOption: A
Dec 5, 2022

A -In API version 44.0 and later, you can improve runtime performance by caching method results on the client by using the annotation @AuraEnabled(cacheable=true). https://developer.salesforce.com/forums/?id=9062I000000R1hlQAC

sf2022Option: A
Dec 6, 2022

A is correct, using @AuraEnabled(cacheable=true)

Ting21Option: A
Mar 5, 2023

Agree A is correct ans.

santo_ajOption: A
Apr 30, 2023

A is correct https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_auraenabled_annotation.htm

JokeiOption: A
Dec 3, 2023

"Prior to API version 44.0, to cache data returned from an Apex method, you had to call setStorable() in JavaScript code on every action that called the Apex method. For API version of 44.0 or higher, you must mark the Apex method as storable (cacheable) and you can get rid of any setStorable() calls in JavaScript code. The Apex annotation approach is better because it centralizes your caching notation for a method in the Apex class." Option A

Jeet89123Option: A
May 29, 2024

its correct