Hi all, I've reached a problem building my API proxy. For GET method I lookup for data in cache by LookupCache policy (if it's not there i populate it by PopulateCache policy) and for DELETE method I purge it by InvalidateCache policy. Unfortunatelly this cache entry is not cleared at all and GET method sees the old data. Please help. Bellow I attached policies XMLs:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <LookupCache async="false" continueOnError="false" enabled="true" name="Lookup-Cache-For-Messages"> <DisplayName>Lookup Cache For Messages</DisplayName> <Properties/> <CacheKey> <Prefix/> <KeyFragment>os</KeyFragment> <KeyFragment ref="verifyapikey.verify-api-key.brand"/> <KeyFragment ref="verifyapikey.verify-api-key.locale"/> <KeyFragment ref="accesstoken.username"/> <KeyFragment>getMessage</KeyFragment> </CacheKey> <Scope>Exclusive</Scope> <CacheResource>OwnerServices</CacheResource> <AssignTo>getMessage</AssignTo> </LookupCache>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <PopulateCache async="false" continueOnError="false" enabled="true" name="Populate-Cache-For-Messages"> <DisplayName>Populate Cache For Messages</DisplayName> <Properties/> <CacheKey> <Prefix/> <KeyFragment>os</KeyFragment> <KeyFragment ref="verifyapikey.verify-api-key.brand"/> <KeyFragment ref="verifyapikey.verify-api-key.locale"/> <KeyFragment ref="accesstoken.username"/> <KeyFragment>getMessage</KeyFragment> </CacheKey> <Scope>Exclusive</Scope> <CacheResource>OwnerServices</CacheResource> <Source>getMessageResponse.content</Source> </PopulateCache>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <InvalidateCache async="false" continueOnError="false" enabled="false" name="Invalidate-Cache-For-Messages"> <DisplayName>Invalidate Cache For Messages</DisplayName> <Properties/> <CacheKey> <Prefix/> <KeyFragment>os</KeyFragment> <KeyFragment ref="verifyapikey.verify-api-key.brand"/> <KeyFragment ref="verifyapikey.verify-api-key.locale"/> <KeyFragment ref="accesstoken.username"/> <KeyFragment>getMessage</KeyFragment> </CacheKey> <CacheResource>OwnerServices</CacheResource> <Scope>Exclusive</Scope> <CacheContext> <APIProxyName>Some string</APIProxyName> <ProxyName>Some string</ProxyName> <TargetName>Some string</TargetName> </CacheContext> <PurgeChildEntries>false</PurgeChildEntries> </InvalidateCache>
Welcome to Apigee Community.
Just FYI, You can also use Code Button in rich text editor to prettify your code... I have done that for now 🙂
OK, Thank you 🙂
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |