Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 15 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 15
Topic #: 1
[All Certified Platform Developer II Questions]

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

  • A. Decorate the server-side method with @AuraEnabled(cacheable=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(storable=true).
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Rocky_sfdc
Highly Voted 3 years, 9 months ago
A is correct .... after API version 44 not need of declaring at client side .
upvoted 16 times
...
NiuNiuG
Highly Voted 3 years, 9 months ago
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.
upvoted 10 times
...
Jeet89123
Most Recent 5 months, 2 weeks ago
Selected Answer: A
its correct
upvoted 1 times
...
Jokei
11 months, 2 weeks ago
Selected Answer: A
"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
upvoted 1 times
...
MetaLojiqTee
1 year, 3 months ago
Selected Answer: A
A is correct
upvoted 2 times
...
santo_aj
1 year, 6 months ago
Selected Answer: A
A is correct https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_auraenabled_annotation.htm
upvoted 1 times
...
Ting21
1 year, 8 months ago
Agree A is correct ans.
upvoted 1 times
...
sf2022
1 year, 11 months ago
Selected Answer: A
A is correct, using @AuraEnabled(cacheable=true)
upvoted 1 times
...
chenxin
1 year, 11 months ago
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
upvoted 1 times
...
levian
2 years, 1 month ago
A is the ans
upvoted 1 times
...
CaiXiDan
2 years, 4 months ago
Selected Answer: A
A is the correct answer
upvoted 1 times
...
amerbearat
3 years, 3 months ago
Ans: A To improve runtime performance, set @AuraEnabled(cacheable=true) to cache the method results on the client.
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...