Condition for using PopulateCache

corylprice
Participant I

I have a scenario where a request will be sent in, I then use the LookupCache policy to see if a value exists in the cache. I then call the PopulateCache policy to add the values to the cache. But I want to call the PopulateCache policy only if the value doesn't exist when it does the lookup.

An example is in the request key:helloworld value:1234 is sent, if the key helloworld doesn't exist when the lookupcache policy is called, use the popluatecache policy otherwise skip populatecache policy and carry on as normal.

Any help in what condition can be used in the flow to achieve this would be much appreciated.

Thanks

Solved Solved
0 2 239
1 ACCEPTED SOLUTION

<Step>
  <Name>LookupCache-1</Name>
</Step>
<Step>
  <Condition>lookupvariable = null</Condition>
  <Name>PopulateCache-1</Name>
</Step>

View solution in original post

2 REPLIES 2

<Step>
  <Name>LookupCache-1</Name>
</Step>
<Step>
  <Condition>lookupvariable = null</Condition>
  <Name>PopulateCache-1</Name>
</Step>

Thanks @Dino-at-Google that solution worked!!