Title: Flush Cache
Last modified: August 11, 2017

---

# Flush Cache

 *  Resolved [Andrew](https://wordpress.org/support/users/schmitt/)
 * (@schmitt)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/flush-cache/)
 * Feature request – the caching is great, and the ability to set the cache expiration
   is also great, but a button (or even better, a user configurable URL) that could
   force a cache flush would be good.
 * In an automation scenario, the Airpress database might be updated (via Zapier)
   and having the option to hit a URL to flush the AirPress cache would be a good
   way to ensure changes are reflected right away. The URL should be user configurable
   so a malicious user couldn’t keep flushing the cache.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chester McLaughlin](https://wordpress.org/support/users/chetmac/)
 * (@chetmac)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/flush-cache/#post-9402536)
 * I’ve added a function airpress_flush_cache to the just released v1.1.39. I’ll
   leave it to you to configure either an ajax URL or a page that will trigger the
   function.
 * airpress_flush_cache() will delete expired cached requests. These would have 
   been “deleted” or “overwritten” the next time they were requested anyway.
 * airpress_flush_cache(true) will delete all cached requests.
 * Also, remember that you can configure a “Query var to force refresh cache for
   this request” on the Airtable Connection configuration. By default, adding ?fresh
   =true to any URL will force the requests made on that page load to be fresh from
   Airtable. Obviously not directly applicable to your situation, but in case others
   are reading this…
 * Lastly, it’s worth considering relying on your refresh and expire settings to
   manage the cache and staying away from the nuclear option of deleting the entire
   cache. For example you could set your refresh to 300 (5 minutes) and your expire
   to 86400 (24 hours) which would fetch fresh data from Airtable in the background
   every 5 minutes and ensure that no data is cached for longer than 24 hours.
 * Again, for anyone reading this: expire is the longest time a request can be served
   from the cache before the page load must wait for the refreshed data from Airtable.
   refresh is the longest time a request can be served from the cache before the
   request is refreshed in the background.
 * Thanks for the feedback!

Viewing 1 replies (of 1 total)

The topic ‘Flush Cache’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/airpress_c9d28c.svg)
 * [Airpress](https://wordpress.org/plugins/airpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/airpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/airpress/)
 * [Active Topics](https://wordpress.org/support/plugin/airpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/airpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/airpress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chester McLaughlin](https://wordpress.org/support/users/chetmac/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/flush-cache/#post-9402536)
 * Status: resolved