ResponseCache not expiring using Cache Resource configurations

I have set a Cache Resource configuration that expires every 30 seconds.

screen-shot-2021-01-20-at-111755-am.png

I'm trying to use it in ResponseCache:

<ResponseCache async="false" continueOnError="false" enabled="true" name="Response-Cache">
    <DisplayName>Response Cache</DisplayName>
    <Properties/>
    <CacheKey>
        <Prefix/>
        <KeyFragment ref="request.uri" type="string"/>
    </CacheKey>
    <Scope>Exclusive</Scope>
    <CacheResource>DK-GravtyAdminToken</CacheResource>
    <SkipCacheLookup/>
    <SkipCachePopulation/>
</ResponseCache>

I'm testing to see whether it expires after 30 seconds or not, and it seems to not expire and just stay indefinitely.

Appreciate any help or insights.

0 5 154
5 REPLIES 5

Not applicable

I don't see below cache expiry setting in your resposne cache policy. Please add in your policy and try.

<ExpirySettings>
        <TimeoutInSeconds>30</TimeoutInSeconds>
</ExpirySettings>

I don't want to set it on the policy. I want to set it in the configuration, so that we change it on the configuration rather than changing it on proxy level. The configuration is a feature by Apigee, so it should be working, rather than resorting to workarounds.

then try the expiry more than 180 sec.

Note the minimum time for cache expiry is 180 seconds. This is in the product limits

https://docs.apigee.com/api-platform/reference/limits

Hi Team,
Cache resource is not refresh after 5 mins.