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

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 366 discussion

Actual exam question from Salesforce's CRT-450
Question #: 366
Topic #: 1
[All CRT-450 Questions]

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).
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
irina_735
1 year, 2 months ago
Selected Answer: D
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. https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_auraenabled_annotation.htm
upvoted 2 times
...
tuananhbgbg
1 year, 4 months ago
Selected Answer: D
if we are talking about Apex classes then it is D. C seems vague since we dont know what is the client side we are using
upvoted 3 times
...
KonJfk
1 year, 6 months ago
"To cache data returned from an Apex method for any component with an API version of 44.0 or later, annotate the Apex method with @AuraEnabled(cacheable=true)." So why not D?
upvoted 3 times
...
DonAldos
1 year, 7 months ago
Selected Answer: A
Should be A
upvoted 1 times
ca7d262
2 months ago
Droppings bro, it's D.
upvoted 1 times
...
BrucePark
1 year, 3 months ago
Storable? Really?
upvoted 2 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 ...