title: How to use a query parameter to have the server delete the API call cache (django, DRF)
body: <p>I'm using Django Rest Framework and DRF-extensions (<a href="http://chibisov.github.io/drf-extensions/docs/#how-key-constructor-works" rel="nofollow">http://chibisov.github.io/drf-extensions/docs/#how-key-constructor-works</a>).</p>
  
  <p>I have an API call /user/:id/products, which provides the full list of products that a user has access to.  Because it's an expensive query, I'm caching it based on method id, format, language, user, and retrieval SQL query.  </p>
  
  <p>I have another API call /pay which handles all of our payments.  The product ids are POST arguments to that API call.</p>
  
  <p>After a user pays, immediately it directs them to the product page--but since the product query is cached, it still displays the old list of products, not the updated list with the new products they just purchased.  I know about the <code>cache.delete</code> method, but getting the key from <code>/pay</code> is difficult since it's a completely different API call.</p>
  
  <p>What I would like to do is add a parameter <code>force_refresh</code> to the <code>/user/:id/products</code> API call, that, if present, calculates the hash key as if the <code>force_refresh</code> parameter weren't present and then clears the cache for that key.  However, I can't find the right place in <code>KeyConstructor</code> within drf-extension's caching framework to stick this in. <strong>What is the best way for me to let the server know to delete the cache for this query?</strong></p>