LookupCache is working weirdly, i.e it's retrieving cache sometimes and other times it's empty

Not applicable

LookupCache policy configuration:

<LookupCache async="false" continueOnError="false" enabled="true" name="Lookup-Cache-2">
    <DisplayName>Lookup Cache-1</DisplayName>
    <Properties/>
    <CacheKey>
        <Prefix>pupulate</Prefix>
        <KeyFragment>cache</KeyFragment>
    </CacheKey>
    <Scope>Global</Scope>
    <AssignTo>myvariable1</AssignTo>
</LookupCache>

PopulateCache configuration:

<PopulateCache async="false" continueOnError="false" enabled="true" name="Populate-Cache-1">
    <DisplayName>Populate Cache-1</DisplayName>
    <Properties/>
    <CacheKey>
        <Prefix>pupulate</Prefix>
        <KeyFragment>cache</KeyFragment>
    </CacheKey>
    <Scope>Global</Scope>
    <ExpirySettings>
        <TimeoutInSec>3600</TimeoutInSec>
    </ExpirySettings>
    <Source>response.content</Source>
</PopulateCache>

What happens is: with LookupCache, the result is there for every 4th request, but for other it's not even present.
I am not getting what exactly I am missing. Please help.

0 4 426
4 REPLIES 4

rmishra
Participant V

How soon after creating the cache , do you attempt to retrieve it?

How many message processors do you have associated with the current environment?

Not applicable

Just after creating the cache. Since it's a trial account, according to documentation MPs should be 2.

Not applicable

please answer where exactly I am missing @Rahul M

rmishra
Participant V

Since you are using a trial cloud account, it's harder for me to suggest debug steps.

Your code seems to be fine. I suspect there may be some issues with Cache replication across MP's but there is nothing you can do to fix it.

Perhaps contact Apigee Edge Support?