I'm building a plugin to browse store orders via a third-party API. I make various requests to URLs that can include query parameters:
/customers
/orders/e8b48e72-9c7f-4d6f-91aa-2f7238bdf936
/orders?offset=0&limit=250&from=2014-05-26T22%3A58%3A38%2B00%3A00&to=2014-06-26T22%3A58%3A38%2B00%3A00
I've just started using Guzzle and more importantly craft()->fileCache
to keep results around for a few minutes and speed up browsing. I use the query URI as the key for the cache:
craft()->fileCache->set($query, $response->getBody(true), 600); // store result for 10 minutes
A web hook gets hit with every new order that comes in, making it an ideal time to clear out these caches I've set—but I have no idea how.
Is there any way I can tag this plugin's caches or somehow clear out only those I've made, rather than get overzealous with craft()->fileCache->flushValues()
?