Conversation
supportHi 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
Hi @seanthompson , you must set the full (complete) URL one line, eg: 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 Here the exclusion URL are checked. This reply was modified 6 years, 3 months ago by nigro.simone . This reply was modified 6 years, 3 months ago by nigro.simone .
Thanks for your quick reply. Excluding the page /payment is working now. Still not the others, though. Entered as https://domain.com/invoice/ Here’s a test invoice url… https://kenbegiesplumbing.com/invoice/test-invoice
This page is cached 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?
It works if I put the full url in exclusions. I can only put https://kenbegiesplumbing.com/invoice/ though because every one is a different url. Just like /category/category-name I’ll remove the full url.
Exclusions urls only support full URL. Partial URL is a future feature.
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.
Hi @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, 3 months ago by nigro.simone . This reply was modified 6 years, 3 months ago by nigro.simone . This reply was modified 6 years, 3 months ago by nigro.simone .
Great. Thank you.
Hi @seanthompson , you must set the full (complete) URL one line, eg: 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 Here the exclusion URL are checked. This reply was modified 6 years, 3 months ago by nigro.simone . This reply was modified 6 years, 3 months ago by nigro.simone .
Thanks for your quick reply. Excluding the page /payment is working now. Still not the others, though. Entered as https://domain.com/invoice/ Here’s a test invoice url… https://kenbegiesplumbing.com/invoice/test-invoice
This page is cached 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?
It works if I put the full url in exclusions. I can only put https://kenbegiesplumbing.com/invoice/ though because every one is a different url. Just like /category/category-name I’ll remove the full url.
Exclusions urls only support full URL. Partial URL is a future feature.
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.
Hi @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, 3 months ago by nigro.simone . This reply was modified 6 years, 3 months ago by nigro.simone . This reply was modified 6 years, 3 months ago by nigro.simone .
Great. Thank you.