File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
force-app/main/default/classes/main/cached-soql
website/docs/api/cached-soql Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public virtual inherited sharing class SOQLCache implements Cacheable {
6161 mock .setMock (mockId , new List <SObject >{ record });
6262 }
6363
64- public static void invalidateRecords (List <SObject > records ) {
64+ public static void refreshRecords (List <SObject > records ) {
6565 if (records .isEmpty ()) {
6666 return ;
6767 }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ The following are methods for using `SOQLCache`:
2929[ ** CACHE EXPIRATION** ] ( #cache-expiration )
3030
3131- [ ` maxHoursWithoutRefresh() ` ] ( #maxhourswithoutrefresh )
32- - [ ` invalidateRecords (List<SObject> records)` ] ( #invalidaterecords )
32+ - [ ` refreshRecords (List<SObject> records)` ] ( #refreshrecords )
3333
3434[ ** INITIAL QUERY** ] ( #initial-query )
3535
@@ -183,21 +183,21 @@ SOQLCache.of(Profile.SObjectType)
183183 .toObject();
184184```
185185
186- ### invalidateRecords
186+ ### refreshRecords
187187
188- The ` invalidateRecords ` method allows clearing records from the cache, triggering an automatic refresh the next time the query is executed.
188+ The ` refreshRecords ` method allows clearing records from the cache, triggering an automatic refresh the next time the query is executed.
189189
190190** Signature**
191191
192192``` apex
193- Cacheable invalidateRecords (List<SObject> records)
193+ Cacheable refreshRecords (List<SObject> records)
194194```
195195
196196** Example**
197197
198198``` apex
199199trigger SomeObjectTrigger on SomeObject (after update, after delete) {
200- SOQLCache.invalidateRecords (Trigger.old );
200+ SOQLCache.refreshRecords (Trigger.new );
201201}
202202```
203203
You can’t perform that action at this time.
0 commit comments