KVM not deleted after expiry time

pxzxz1
New Member

Hello Apigeeks

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="Create-KVM" mapIdentifier="Create Proxy KVM">
    <DisplayName>Create KVM</DisplayName>
    <Properties/>
    <ExclusiveCache>false</ExclusiveCache>
    <ExpiryTimeInSecs>120</ExpiryTimeInSecs>
    <Put override="true">
        <Key>
            <Parameter ref="request.queryparam.kvmkey"/>
        </Key>
        <Value ref="request.queryparam.kvmvalue"/>
    </Put>
    <Scope>environment</Scope>
</KeyValueMapOperations>

I have problem with the expiry time in seconds. I am expecting the key and value to be removed from the list but it is not. Please help.

1 1 223
1 REPLY 1

I think there is a misunderstanding.

The ExpiryTimeInSecs element pertains to the CACHE.

Think of KVM as a set of key-value pairs, written to a persistent store. When you perform a Put , the Apigee runtime will do 2 things: (a) write to the persistent store, and (b) populate an in-memory cache with the information that the policy has written to the persistent store. For subsequent KeyValueMapOperations/Get calls, Apigee will use that cache to satisfy the lookups, until the time of expiry. After the cache entry expires, a Get call will read the persistent store, and re-populate the cache.

The KVM in Apigee does not have an auto-delete feature.