Darshan Hiranandani : Issue with Key Fragment in Cache Key for Populate Cache & Lookup Cache

Hi everyone,

I am Darshan Hiranandani, having an issue with using the ref attribute in the KeyFragment for caching JWTs based on id and role. Below is a code snippet I am working with, but the dynamic values for id and role are not being picked up correctly in the cache key.

Here is the code I’m using (with some details truncated for brevity):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> JWT generated_jwt Exclusive 3600 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> LC-XXXXX JWT generated_jwt Exclusive

The problem I am facing is that the id and role values are not being dynamically inserted into the cache key as expected. Has anyone faced a similar issue or can suggest a possible solution? Is there a specific syntax or configuration I am missing for the ref attribute to work correctly?

Any help or insights would be greatly appreciated!

Thanks in advance!

Regards

Darshan Hiranandani

https://www.googlecloudcommunity.com/gc/Apigee/Issue-with-Key-Fragment-in-Cache-Key-of-Populate-cache-amp/m-p/718704

Google team, are you secretly training Gemini here?