What is the prefix 2_ in the key value for cache-store-value when tracing

Martin Kallukalam 365 Reputation points
2024-09-06T03:39:44.6533333+00:00

I have a cache store policy as below

<set-variable name="accesstoken" value="BBBB" /> <cache-store-value key="@((string)context.Variables["accesstoken"])" value="@((String)context.Variables["tokenlookupkeyhash"])" duration="60" caching-type="internal" />

when I trace this , I see the corresponding cache store policy showing key as "2_BBBB" Things seems to be working correctly, but why is trace showing key as 2_BBBB and not just BBBB. I am seeing this prefix 2_ in every cache-store-value policy for the key.

enter image description here

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,332 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ben Gimblett 4,550 Reputation points Microsoft Employee
    2024-09-06T14:32:11.84+00:00

    Hi Thanks for the question

    Vitaliy from the product group answered that question here on SO https://stackoverflow.com/questions/72301346/apim-cache-lookup-value-with-external-redis-key-is-always-prefixed-by-2


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.