In the "Store to Cache" and "Look Up in Cache" assertions there is an option to set the Cache ID. It is set to defaultCache when you first open the assertions. Change the value in there to isolate the information that is cached. I usually change it from defaultCache any time I use the internal cache, anyway, just to ensure nothing gets clobbered accidentally. For example: messageCache and headerCache.
Also be careful that when retrieving a value from a cache it comes out as a message type context variable, so the retrieved header value will need the .mainpart suffix when used in the "Transport Properties/Headers" assertion.
------------------------------
Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
------------------------------
Original Message:
Sent: 11-08-2019 03:28 PM
From: Louie Kwan
Subject: Add Cache-Control header when using "Response: Look Up in Cache" Assertion
Thanks for your quick response.
If I put two "Response: Look Up in Cache", it only take the first one. What you refer to separate cache, what cache you are referencing to ?
Same Key and using "Transport Properties/Headers" assertion at runtime should be fine.
Thanks in advance.
------------------------------
Enterprise Architect
TwoCoins.ca Inc.
Original Message:
Sent: 11-08-2019 03:14 PM
From: Jay MacDonald
Subject: Add Cache-Control header when using "Response: Look Up in Cache" Assertion
That is correct. The cache ONLY saves the message body. If you need to save headers then you will need to store them in a separate cache using the same key value, then apply them using the "Transport Properties/Headers" assertion at runtime.
------------------------------
Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
Original Message:
Sent: 11-08-2019 03:06 PM
From: Louie Kwan
Subject: Add Cache-Control header when using "Response: Look Up in Cache" Assertion
It seems I can only save the body of the response and nothing in the header can be stored "Response: Look Up in Cache".
This is a big limitation?
Any tip to overcome this constraint?
------------------------------
Enterprise Architect
TwoCoins.ca Inc.
Original Message:
Sent: 11-04-2019 10:52 AM
From: Louie Kwan
Subject: Add Cache-Control header when using "Response: Look Up in Cache" Assertion
Thanks for your info. It works, but it seems all header info is not saved.
It seems I can only save the body of the response and nothing in the header can be stored "Response: Look Up in Cache".
This is a big limitation?
Any tip to overcome this constraint?
------------------------------
Enterprise Architect
TwoCoins.ca Inc.
Original Message:
Sent: 11-01-2019 06:45 AM
From: Joe Dascole
Subject: Add Cache-Control header when using "Response: Look Up in Cache" Assertion
Hi Louie.
The Manage Transport Properties/Headers assertion is your best bet as you noted. Add the assertion and then right click on it and choose 'Select Target Message', change to response.
ie:
Original Message:
Sent: 10-31-2019 12:09 PM
From: Louie Kwan
Subject: Add Cache-Control header when using "Response: Look Up in Cache" Assertion
Using "Store to Cache" then "Response: Look Up in Cache" Assertions.
It seems working fine but we have a need to add Cache-Control header when using "Response: Look Up in Cache" Assertion.
I found no luck for that. For "Transport Properties/Headers Properties" is mainly for request, but not response message.
Any tip will be much appreciated.
Thanks.
Louie Kwan
AWS Certified Solutions Architect – Associate
------------------------------
Enterprise Architect
AWS Certified Solutions Architect – Associate
------------------------------