Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Lookup Cache is not working for subsequent requests.

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:

  1. Changing scope (Global, Exclusive, etc.)
  2. Using a Prefix rather than scope
  3. Using no Prefix
  4. Long timeouts
  5. Short timeouts
  6. Duplicating my proxy from scratch
  7. Using an Environment cache rather than the global cache

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.

0 4 502
4 REPLIES 4