I am having the exact same problem as described here:
https://community.apigee.com/questions/1421/lookup-cache-is-not-working-for-subsequent-request.html
My problem was not resolved by simply re-deploying and has persisted for a number of days now.
I have tried my policies in a personal Apigee account (used for training) and they worked there. But they are not working with my company's setup.
Lookup Policy:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <LookupCache async="false" continueOnError="false" enabled="true" name="Lookup-Cache"> <DisplayName>Lookup-Cache</DisplayName> <Properties/> <CacheKey> <KeyPrefix>MyCache</KeyPrefix> <KeyFragment>cachedAuth</KeyFragment> </CacheKey> <Scope>Proxy</Scope> <AssignTo>creds</AssignTo> </LookupCache>
Populate Policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <PopulateCache async="false" continueOnError="false" enabled="true" name="Populate-Auth-Token"> <DisplayName>Populate Auth Token</DisplayName> <Properties/> <CacheKey> <KeyPrefix>MyCache</KeyPrefix> <KeyFragment>cachedAuth</KeyFragment> </CacheKey> <Scope>Proxy</Scope> <ExpirySettings> <TimeoutInSec>20</TimeoutInSec> </ExpirySettings> <Source>creds</Source> </PopulateCache>
Things I have tried:
Nothing works. I always get a cache miss. If I include a lookup in the same flow AFTER the populate then it finds my value.