From 7db43883d1f01e8bf490f8fd21048a53d4047990 Mon Sep 17 00:00:00 2001 From: Piotr PG Gajek Date: Thu, 25 Jun 2026 19:14:36 +0200 Subject: [PATCH] release v6.11.1 --- .../default/classes/cached-soql/SOQLCache.cls | 26 +++++++++++++------ .../default/classes/cached-soql/SOQLCache.cls | 26 +++++++++++++------ sfdx-project.json | 9 ++++--- website/docs/docs/installation.md | 8 +++--- 4 files changed, 45 insertions(+), 24 deletions(-) diff --git a/force-app/main/default/classes/cached-soql/SOQLCache.cls b/force-app/main/default/classes/cached-soql/SOQLCache.cls index bc105201..fc595a4d 100644 --- a/force-app/main/default/classes/cached-soql/SOQLCache.cls +++ b/force-app/main/default/classes/cached-soql/SOQLCache.cls @@ -368,6 +368,16 @@ public virtual inherited sharing class SOQLCache implements Cacheable { private CacheManager.Cacheable storage = CacheManager.ApexTransaction; private String cacheKey; + public List cachedItems { + get { + if (cachedItems == null) { + cachedItems = this.getCachedRecords(); + } + return cachedItems; + } + private set; + } + public CacheStorageProxy(String ofObject) { this.cacheKey = this.getAlphanumericKeyFromObjectApiName(ofObject); } @@ -376,6 +386,10 @@ public virtual inherited sharing class SOQLCache implements Cacheable { return Pattern.compile('[^a-zA-Z0-9]').matcher(ofObject).replaceAll(''); } + private List getCachedRecords() { + return (List) (this.storage.get(this.cacheKey) ?? new List()); + } + public CacheStorageProxy apexTransaction() { this.storage = CacheManager.ApexTransaction; return this; @@ -409,12 +423,8 @@ public virtual inherited sharing class SOQLCache implements Cacheable { return this.storage.contains(this.cacheKey); } - public List getCachedRecords() { - return (List) (this.storage.get(this.cacheKey) ?? new List()); - } - public void addRecordsToCache(List recordsToAdd) { - List allCachedRecords = getCachedRecords(); + List allCachedRecords = cachedItems; for (SObject databaseRecord : recordsToAdd) { allCachedRecords.add(new CacheItem(databaseRecord)); @@ -424,7 +434,7 @@ public virtual inherited sharing class SOQLCache implements Cacheable { } public void updateRecordsInCache(List recordsToUpdate) { - List allCachedRecords = getCachedRecords(); + List allCachedRecords = cachedItems; Map updatedRecordsById = new Map(recordsToUpdate); @@ -443,7 +453,7 @@ public virtual inherited sharing class SOQLCache implements Cacheable { List filteredCachedItems = new List(); - for (CacheItem cachedRecord : getCachedRecords()) { + for (CacheItem cachedRecord : cachedItems) { if (!recordsToRemoveIds.contains(cachedRecord.id)) { filteredCachedItems.add(cachedRecord); } @@ -469,7 +479,7 @@ public virtual inherited sharing class SOQLCache implements Cacheable { private List cachedItemsThatMeetCriteria { get { if (this.cachedItemsThatMeetCriteria == null) { - this.cachedItemsThatMeetCriteria = this.filterGroup.filter(this.storage.getCachedRecords()); + this.cachedItemsThatMeetCriteria = this.filterGroup.filter(this.storage.cachedItems); } return this.cachedItemsThatMeetCriteria; } diff --git a/package/main/default/classes/cached-soql/SOQLCache.cls b/package/main/default/classes/cached-soql/SOQLCache.cls index 27d2b2ae..40df2971 100644 --- a/package/main/default/classes/cached-soql/SOQLCache.cls +++ b/package/main/default/classes/cached-soql/SOQLCache.cls @@ -323,6 +323,16 @@ global virtual inherited sharing class SOQLCache implements Cacheable { private CacheManager.Cacheable storage = CacheManager.ApexTransaction; private String cacheKey; + public List cachedItems { + get { + if (cachedItems == null) { + cachedItems = this.getCachedRecords(); + } + return cachedItems; + } + private set; + } + public CacheStorageProxy(String ofObject) { this.cacheKey = this.getAlphanumericKeyFromObjectApiName(ofObject); } @@ -331,6 +341,10 @@ global virtual inherited sharing class SOQLCache implements Cacheable { return Pattern.compile('[^a-zA-Z0-9]').matcher(ofObject).replaceAll(''); } + private List getCachedRecords() { + return (List) (this.storage.get(this.cacheKey) ?? new List()); + } + public CacheStorageProxy apexTransaction() { this.storage = CacheManager.ApexTransaction; return this; @@ -364,12 +378,8 @@ global virtual inherited sharing class SOQLCache implements Cacheable { return this.storage.contains(this.cacheKey); } - public List getCachedRecords() { - return (List) (this.storage.get(this.cacheKey) ?? new List()); - } - public void addRecordsToCache(List recordsToAdd) { - List allCachedRecords = getCachedRecords(); + List allCachedRecords = cachedItems; for (SObject databaseRecord : recordsToAdd) { allCachedRecords.add(new CacheItem(databaseRecord)); @@ -379,7 +389,7 @@ global virtual inherited sharing class SOQLCache implements Cacheable { } public void updateRecordsInCache(List recordsToUpdate) { - List allCachedRecords = getCachedRecords(); + List allCachedRecords = cachedItems; Map updatedRecordsById = new Map(recordsToUpdate); @@ -398,7 +408,7 @@ global virtual inherited sharing class SOQLCache implements Cacheable { List filteredCachedItems = new List(); - for (CacheItem cachedRecord : getCachedRecords()) { + for (CacheItem cachedRecord : cachedItems) { if (!recordsToRemoveIds.contains(cachedRecord.id)) { filteredCachedItems.add(cachedRecord); } @@ -424,7 +434,7 @@ global virtual inherited sharing class SOQLCache implements Cacheable { private List cachedItemsThatMeetCriteria { get { if (this.cachedItemsThatMeetCriteria == null) { - this.cachedItemsThatMeetCriteria = this.filterGroup.filter(this.storage.getCachedRecords()); + this.cachedItemsThatMeetCriteria = this.filterGroup.filter(this.storage.cachedItems); } return this.cachedItemsThatMeetCriteria; } diff --git a/sfdx-project.json b/sfdx-project.json index 57b9d604..a21389f2 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -1,8 +1,8 @@ { "packageDirectories": [ { - "versionName": "SOQL Lib 6.11.0", - "versionNumber": "6.11.0.NEXT", + "versionName": "SOQL Lib 6.11.1", + "versionNumber": "6.11.1.NEXT", "path": "package", "default": true, "package": "SOQL Lib", @@ -35,6 +35,7 @@ "SOQL Lib@6.10.0-1": "04tP60000036lIfIAI", "SOQL Lib@6.10.1-1": "04tP60000036lfFIAQ", "SOQL Lib@6.10.2-1": "04tP60000038Fo9IAE", - "SOQL Lib@6.11.0-1": "04tP6000003MO5BIAW" + "SOQL Lib@6.11.0-1": "04tP6000003MO5BIAW", + "SOQL Lib@6.11.1-1": "04tP6000003On13IAC" } -} +} \ No newline at end of file diff --git a/website/docs/docs/installation.md b/website/docs/docs/installation.md index c9a8c502..4df40c37 100644 --- a/website/docs/docs/installation.md +++ b/website/docs/docs/installation.md @@ -6,7 +6,7 @@ sidebar_position: 20 # Installation @@ -15,13 +15,13 @@ sidebar_position: 20 Install the SOQL Lib unlocked package with `btcdev` namespace to your Salesforce environment: -`/packaging/installPackage.apexp?p0=04tP6000003MO5BIAW` +`/packaging/installPackage.apexp?p0=04tP6000003On13IAC` - +

Install on Sandbox

- +

Install on Production