
AuraEnabled Annotation
The @AuraEnabled annotation enables client- and server-side access to an Apex controller method. Providing this annotation makes your methods available to your Lightning components (both Lightning web components and Aura components). Only methods with this annotation are exposed.
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). You can cache method results only for methods that retrieve data but do not modify it. Using this annotation eliminates the need to call setStorable() in JavaScript code on every action that calls the Apex method.
For more information, see Lightning Aura Components Developer Guide and Lightning Web Components Developer Guide.
@AuraEnbaled(cacheable=true)
API 버전 44.0 이상에서는 주석을 사용하여 클라이언트에서 메서드 결과를 캐싱하여 런타임 성능을 향상
데이터를 검색하지만 수정하지 않는 메서드에 대해서만 메서드 결과를 캐시할 수 있음
setStorable() Apex 메서드를 호출하는 모든 작업의 JavaScript 코드에서 이 주석을 사용하면 호출할 필요가 없음
AuraEnabled Annotation | Apex Developer Guide | Salesforce Developers
The @AuraEnabled annotation enables client- and server-side access to an Apex controller method. Providing this annotation makes your methods available to your Lightning components (both Lightning web components and Aura components). Only methods with this
developer.salesforce.com
'Salesforce' 카테고리의 다른 글
| 세일즈포스 서비스 클라우드 시험 공부-Dump5 (0) | 2022.05.21 |
|---|---|
| 세일즈포스 6개 자격증 취득 후기 / 2022 목표 (0) | 2022.05.21 |
| 세일즈포스 서비스 클라우드 컨설턴트 자격증 - 3 (0) | 2021.06.30 |
| 세일즈포스 서비스 클라우드 컨설턴트 자격증 - 2 (0) | 2021.06.30 |
| 세일즈포스 서비스 클라우드 컨설턴트 자격증 - 1 (0) | 2021.06.30 |