Title: Cache Exceptions
Last modified: February 26, 2020

---

# Cache Exceptions

 *  Resolved [Sean Thompson](https://wordpress.org/support/users/seanthompson/)
 * (@seanthompson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/)
 * Hi Simone,
 * This is the first time I tried excluding pages from the cache for excluding Sliced
   Invoices payment and invoices. I entered the urls as both…
 * /payment
    /invoice /quote
 * and using the full url.
 * Neither worked.
 * Both /invoice and /quote have /invoice-or-quote-title after them, so those all
   have to be excluded by adding /invoice and /quote.
 * I normally install Sliced Invoices on a separate install in a folder named account,
   and don’t use a caching plugin. This time I have it in the root install, so I
   need to exclude it.
 * Thanks in advance,
    Sean

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

 *  Plugin Author [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12485206)
 * Hi [@seanthompson](https://wordpress.org/support/users/seanthompson/),
    you must
   set the full (complete) URL one line, eg: [https://my-website.com/my-page/](https://my-website.com/my-page/)
 * If not works I need to check during the weekend.
 * You can share the link of your pages for help me in the investigation?
 * If you want you can debug this point of the code [https://plugins.trac.wordpress.org/browser/speed-up-page-cache/trunk/include/cache-manager.php#L255](https://plugins.trac.wordpress.org/browser/speed-up-page-cache/trunk/include/cache-manager.php#L255)
   
   Here the exclusion URL are checked.
    -  This reply was modified 6 years, 1 month ago by [nigro.simone](https://wordpress.org/support/users/nigrosimone/).
    -  This reply was modified 6 years, 1 month ago by [nigro.simone](https://wordpress.org/support/users/nigrosimone/).
 *  Thread Starter [Sean Thompson](https://wordpress.org/support/users/seanthompson/)
 * (@seanthompson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12486518)
 * Thanks for your quick reply.
 * Excluding the page /payment is working now. Still not the others, though.
 * Entered as [https://domain.com/invoice/](https://domain.com/invoice/)
 * Here’s a test invoice url…
 * [https://kenbegiesplumbing.com/invoice/test-invoice](https://kenbegiesplumbing.com/invoice/test-invoice)
 *  Plugin Author [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12488566)
 * This page is cached [https://kenbegiesplumbing.com/invoice/test-invoice](https://kenbegiesplumbing.com/invoice/test-invoice)
 * You can see at the botton of the HTML source code the comment:
    `<!-- Cache served
   by Speed Up - Page Cache, last modified: Thu, 27 Feb 2020 11:13:16 GMT -->`
 * This comment is added only when the page is cached.
 * If you put this URL into cache exceptions, the page still cached?
 *  Thread Starter [Sean Thompson](https://wordpress.org/support/users/seanthompson/)
 * (@seanthompson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12489058)
 * It works if I put the full url in exclusions.
 * I can only put [https://kenbegiesplumbing.com/invoice/](https://kenbegiesplumbing.com/invoice/)
   though because every one is a different url. Just like /category/category-name
 * I’ll remove the full url.
 *  Plugin Author [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12489523)
 * Exclusions urls only support full URL.
 * Partial URL is a future feature.
 *  Thread Starter [Sean Thompson](https://wordpress.org/support/users/seanthompson/)
 * (@seanthompson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12490559)
 * OK, I’ll just have to continue putting the invoices on a separate install for
   now. I do have one other question. I’ll put it on a separate thread.
 * Thanks for looking into this.
 *  Plugin Author [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12494073)
 * Hi [@seanthompson](https://wordpress.org/support/users/seanthompson/), in the
   next release you can exclude from cache by apply a filter with a custom strategy.
 * You can set this filter into the function.php of your theme (or better into the
   child theme).
 * This is an example:
 *     ```
       /**
       * Speed Up - Page Cache filter
       * If return false, don't cache the page
       * @param $url string The current url.
       * @return boolean
       */
       function my_speed_up_page_cache_cacheable($url) {
           // don't chache url that contains "invoice" word
           return !(strpos($url, 'invoice') !== false);
       }
       add_filter('speed_up_page_cache_cacheable', 'my_speed_up_page_cache_cacheable');
       ```
   
    -  This reply was modified 6 years, 1 month ago by [nigro.simone](https://wordpress.org/support/users/nigrosimone/).
    -  This reply was modified 6 years, 1 month ago by [nigro.simone](https://wordpress.org/support/users/nigrosimone/).
    -  This reply was modified 6 years, 1 month ago by [nigro.simone](https://wordpress.org/support/users/nigrosimone/).
 *  Thread Starter [Sean Thompson](https://wordpress.org/support/users/seanthompson/)
 * (@seanthompson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12494247)
 * Great. Thank you.

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

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

 * ![](https://ps.w.org/speed-up-page-cache/assets/icon-128x128.jpg?rev=2172318)
 * [Speed Up - Page Cache](https://wordpress.org/plugins/speed-up-page-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/speed-up-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/speed-up-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/speed-up-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/speed-up-page-cache/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Sean Thompson](https://wordpress.org/support/users/seanthompson/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/cache-exceptions-4/#post-12494247)
 * Status: resolved