問題文
A museum's Lightning web component lists exhibits, and the team wants repeat visits to the page to show the list without waiting for the server. A developer plans to annotate the Apex method with the cacheable attribute. Which statement describes the constraint that comes with that choice?
選択肢
- The method can still perform DML when the component calls it imperatively rather than with a wire, and the cache is bypassed.
- The method may only read data, so a method that inserts, updates, or deletes records cannot be marked cacheable, a read-only contract.
- Results are held on the server for every user in the org, so the developer has to clear the org's cache partition after a data change before the component can show the new values.
- The method must be declared without the static modifier so that each component instance owns its own copy of the cached result, with one cache per instance.