Layer7 API Management

 View Only
  • 1.  Unable to cache using caching assertions

    Posted May 02, 2016 09:14 AM

    Hello folks,

                     I have setup caching in 8.2 for an API previously. Now when we are doing for a different customer are not able to cache HTTP responses today in 8.3 using the caching assertions only when there is an Route via HTTPs assertion is involved.  But if we do a 'Copy request Message to response' assertion instead, it works like a charm. 

     

    When we use  Route via HTTPs assertion & then do a Store to cache, I can see in audit logs that data was stored but Look up fails to retrieve the cached data. Please advise me what might be going wrong.

     

    Thanks,

    Abhishek



  • 2.  Re: Unable to cache using caching assertions

    Broadcom Employee
    Posted May 04, 2016 10:55 AM

    Abhishek,

     

    The cache assertion is independent of any routing or the template assertion and is just a matter of storing a value in a message context against a set of keys. If you can include a policy snippet of the store and retrieve cache assertion this will help to see what is configured.

     

    Sincerely,

     

    Stephen Hughes

    Director, Technical Support



  • 3.  Re: Unable to cache using caching assertions
    Best Answer

    Posted May 10, 2016 06:12 AM

    Thanks for the reply Steve. I was able to resolve the issue. The root cause was the message size. Since the message size exceeded the limit set in the Store to cache policy, the message was not cached.

     

    I would recommend CA to include more meaningful information when we have such fails. The document tells me the policy is not designed to fail, but a log or better message would help in troubleshooting.

     

    Thanks,

    Abhishek



  • 4.  Re: Unable to cache using caching assertions

    Broadcom Employee
    Posted May 10, 2016 03:22 PM

    Abhishek,

     

    Thank you for your feedback. I've verified your findings on a version 9.0 of the Gateway and see that it does not log even at the finest level. I will post an idea to have this looked at.

     

    Sincerely,

     

    Stephen Hughes

    Director, Technical Support



  • 5.  RE: Re: Unable to cache using caching assertions

    Posted Apr 29, 2020 01:17 PM
    Hi Stephen,

    I have a scenario where I need to store oAuth token from External oAuth url to cache which is valid for 1 hr and need to lookup for that token in cache to post message to url. Can you please give me sample policy related to this.

    Below is my policy

    https://send.firefox.com/download/f0dbbffbd57f1b35/#Oydur78cnIprKcAqNWnDIA

    Looking for two samples:

    1. Add cache assertions store to cache and lookup cache token to above policy
    2. we also have OTK installed on our side can we achieve it using OTK assertions
    • OTK Cache Look Up
    • OTK Cache Store
    • OTK Cache Remove
    • OTK Cache Flush
    Please advise


  • 6.  RE: Re: Unable to cache using caching assertions

    Broadcom Employee
    Posted Apr 29, 2020 04:03 PM
    The link to your policy does not work. Can you copy and paste it here?

    ------------------------------
    Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
    ------------------------------