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 developer wishes to improve runtime performance of Apex calls by caching results on the client.
What is the best way to implement this?
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.
A is correct .... after API version 44 not need of declaring at client side .
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.
Ans: A To improve runtime performance, set @AuraEnabled(cacheable=true) to cache the method results on the client.
A is correct
A is the correct answer
A is the ans
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
A is correct, using @AuraEnabled(cacheable=true)
Agree A is correct ans.
A is correct https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_auraenabled_annotation.htm
"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
its correct