How can we improve Azure API Management?

Purge cache from external system

To control caching time of API-returned items aggressively and issue a command to purge cache when from external system that is aware when items are refreshed. Refresh cycle is not periodic, and can vary.

114 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Sean Feldman shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

5 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    1. Global Flush
    2. Flush by url / complete or wildcard... .com/path/*
    3. Flush by Tag/Group. Tag could comprise combination of header/identity. So I could say cache of list of products for all with customerType X, and a separate cache item of the list of product where customerType is Y.

    Perhaps integration with Redis and MessageBus, so that we could subscribe a api url to a specific Topic, so that when certain events are pushed to that Topic the api could get it and flush the cache or run some specific logic accordingly.

  • Jeff commented  ·   ·  Flag as inappropriate

    We have a need to be able to purge single items from the cache without purging everything .. that would be a huge help.

  • Adam Weigert commented  ·   ·  Flag as inappropriate

    My use case for this is a job runs one or more times a day and at the end of the cycle new data has been loaded that is being cached, I'd like to be able to tell APIM to purge its cached entries. Being able to invalidate individual items would be nice but a global purge for a batch oriented system would work fine.

    I also in the near future will have near-time pub/sub model that will publish changes as they come through. This feature would need to be able to invalidate individual cache URLs. Worst case I keep a batch job that purges the cache on a regular basis.

    An alternative to this would be to be able to set a cache window similar to the quota thresholds. The cache is 1 hour at the top of every hour, so worst case an item gets cached a few minutes before the top of the hour and is invalidated quickly. Most likely I would use a larger cache window for these items so it is refreshed multiple times per day when used, e.g. 12am start and good for 4 hours so I would get 6 refreshes for any data that does get cached without having to make a call to invalidate it.

Feedback and Knowledge Base