Cache Ideas

I have a json request which has the following values in my request header

key1

key2

key3

I am able to extract this and in my condition, I just check

if key1=ABC && key2=CDE &&key3=DEF, I route it http://xxxx.com

if not http://yyyy.com and so on.

I want to add these keys in a cache and route to the URL based on that rather than hardcoding like I have done. I looked into PopulateCache but I am not sure how to add the URL to the list.

As this community is always my first line of defense, I want your ideas on making this really dynamic

0 1 87
1 REPLY 1

I want to add these keys in a cache and route to the URL based on that rather than hardcoding like I have done.

Elaborate a bit, clarify what you mean?

You originally wrote,

I have a json request which has the following values in my request header

You didn't provide an example of this, so here is what I am imagining:

a request header like this:

My-Header: {"key1":"ABC","key2":"CDE","key3":"DEF"}

Is that what you mean?

And then... you want to route the request dynamnically based on the values in this json.

And.... then somehow you want to use a cache. But... what would the cache do?