Skip to content

SOQLCache.removeFromCache is throwing errors in the sessionless transactions #289

@bartlomiejwojtczak-eng

Description

@bartlomiejwojtczak-eng

Describe the bug
SOQLCache.removeFromCache is throwing errors in the sessionless transaction context. In the uploads via API we are getting the following error:
caused by: cache.Session.SessionCacheNoSessionException: Session not found - Session Cache not supported

To Reproduce

  • Add removeFromCache in the objects trigger
  • run the update to the object via API

Expected behavior
Error is not thrown, cache is refreshed for the records

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
removeFromCache is removing the records from all cache types. We developed org caching for the objects which is making us unable to refresh the cache in the uploads via API. Ideally we have an option to specify which cache type we want to refresh in the removeFromCache().

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions