Title: Invalidate cache by using URL
Last modified: September 20, 2017

---

# Invalidate cache by using URL

 *  Resolved [Fahmi Adib](https://wordpress.org/support/users/fahmiadib/)
 * (@fahmiadib)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/invalidate-cache-by-using-url/)
 * Hi, is there any the capability to invalidate the varnish cache by passing the
   URL and not $post_id? Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * (@ethankennedy)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/invalidate-cache-by-using-url/#post-9519103)
 * Not using the native WP Engine function as it stands now since that is based 
   on post number.
 * Accepting a post link probably wouldn’t take much to implement, since I could
   potentially root out the post URL, but then that would be an issue if the URL
   wasn’t a post.
 * I plan on trying to rewrite that function to hit varnish directly, but I don’t
   know exactly the best way to get that done.
 * I’ll do some digging and look for the feasibility of something like this.
 * What exactly are you looking to purge?
 *  Thread Starter [Fahmi Adib](https://wordpress.org/support/users/fahmiadib/)
 * (@fahmiadib)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/invalidate-cache-by-using-url/#post-9550221)
 * Well, we have custom implementation where we intercept URL and serve the page
   using PHP function via plugin, and as you said the URL isn’t a post/custom type.
 * Is it possible to purge that particular page? Purge all page cache is too expensive.
 * Thanks for your efforts!
 *  Plugin Author [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * (@ethankennedy)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/invalidate-cache-by-using-url/#post-9577486)
 * Definitely makes sense, I’ll see what I can do after I flush out the rest API
   stuff. I see a filter I should be able to call to alter the cache purge paths,
   so I’ll experiment with that and adding another method to make it work.
 *  Plugin Author [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * (@ethankennedy)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/invalidate-cache-by-using-url/#post-9657608)
 * This functionality will exist in v 1.3.0.
 *  Plugin Author [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * (@ethankennedy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/invalidate-cache-by-using-url/#post-9996162)
 * Hey Fahmi!
 * I apologize for the delay in getting this done. This functionality has been added
   as part of the 1.3.0 update as previously stated.
 * If you see anything not behaving as expected, or have any other requests, please
   do not hesitate to let me know!
 * Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Invalidate cache by using URL’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpe-advanced-cache-options_24677e.
   svg)
 * [WP Engine Advanced Cache](https://wordpress.org/plugins/wpe-advanced-cache-options/)
 * [Support Threads](https://wordpress.org/support/plugin/wpe-advanced-cache-options/)
 * [Active Topics](https://wordpress.org/support/plugin/wpe-advanced-cache-options/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpe-advanced-cache-options/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpe-advanced-cache-options/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/invalidate-cache-by-using-url/#post-9996162)
 * Status: resolved