Refresh runtime KVM values cached on the MPs L1 cache

mpurwar
Participant IV

We want to write a generic utility API that will take the KVM (MapIdentifier) name along with entry name and its NEW entry value as request payload. API Proxy will extract that info using the assignmessage policy and assign it to variables used in the keyvaluemap operations policy as below -

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations name="RefreshKVM" mapIdentifier="SomeValidMap">
    <Scope>environment</Scope>
    <Put override="true">
        <Key>
            <Parameter ref="somekeyvar"/>  
        </Key>
        <Value ref="somevaluevar"/>
    </Put>
    <ExpiryTimeInSecs>1</ExpiryTimeInSecs>
</KeyValueMapOperations>

Is there a way to set to <mapIdentifier ref="somemapvar" /> as a variable ?

0 1 150
1 REPLY 1

@Mudit Purwar, No. The map identifier doesn't accept dynamic values from variables, it only takes static values.

You can take a look at the suggestion posted on a related post https://community.apigee.com/questions/64683/is-it-possible-to-set-the-mapidentifier-value-from.html

The other option that you can try might be to have multiple kvm operations policy, one for each kvm map identifier and use a condition on the policy to be executed for a specific kvm name read from the request parameter or payload.

Note: I understand its Not an efficient solution if you have many kvms that need to be updated; and the utility proxy needs to be changed each time a new kvm with a dynamic update requirement is created.