Trying to understand where the caching regions would be in effect. Or how the cache is keyed?
A: Given, cache region exists for SomeSharedRecord and cached region is empty.
When,
- Code: Select all
def SomeSharedRecord ssr1 := findById(7, SomeSharedRecord);
def SomeSharedRecord ssr2 := findById(7, SomeSharedRecord);
Then, ssr2 is pulled from cache.
B: Given, cache region exists for SomeSharedRecord and cached region is empty.
Given, findSomeSharedRecords is a query that has a parameter of primary keys as a Set and the condition simply uses the set in an in clause (iterator.pk in pkSet)
When,
- Code: Select all
def SomeSharedRecord ssr1 := findById(7, SomeSharedRecord);
def List<SomeSharedRecord> ssrs := findSomeSharedRecords({5, 6, 7});
Then, the element in ssrs that represents 7, was not pulled from cache.
Are examples A and B true? I'm assuming query results are not cached.