Nauris
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Super Cache] Cache home page onlyIn PHP, you can only define constants once, so this additional check makes sure you don’t get warnings if for some reason the
DONOTCACHEPAGEconstant is already defined.Forum: Plugins
In reply to: [WP Super Cache] Problem after migrationHi @alboabourt,
Did you manage to solve the issue by doing what Brandon suggested?Hi @redsector72,
When that setting is enabled it should only clear the cache for the specific post and not the related pages. If that’s not the case, then something is wrong. If you have any plugins that fire certain WordPress hooks when comments are moderated it may result in the whole cache being purged.
It’s difficult to tell without looking at the specific site.
I’d recommend you try out the cache debug tab, enable debugging, and log-in to the debugging view – then open an incognito window and post a comment, reload the debug view and see what output you get when the whole cache is cleared – you might see a helpful message there.
Alternatively, you can force disable this behavior using a filter:
add_filter( 'wpsc_delete_related_pages_on_edit', '__return_zero' );But I strongly recommend to use the debugger to find out the actual cause of the issue, otherwise you might experience the opposite of this problem – cache persisting for too long.
- This reply was modified 3 years, 6 months ago by Nauris.
Forum: Plugins
In reply to: [WP Super Cache] Cloudflare APO & WPSpuer Cache SetupHey @willjames, when you say – a lot of caches are cleared when deleting posts, are they cleared in Super Cache?
If so, what are your cache settings?
There’s a setting in the Advanced tab:
> Clear all cache files when a post or page is published or updated.If that option is checked, it’s going to purge all cache files when a post is updated.
When a post is updated, Super Cache is also going to purge any related taxonomies like tags and categories to that post, so that may be related to what you’re seeing as well.
Super Cache is watching for changes on your site, so if you’re updating a lot of posts frequently, it may be expected behavior.
Can you provide a couple specific examples of situations where caches are cleared but they shouldn’t be?
Forum: Plugins
In reply to: [WP Super Cache] Quantcast ChoiceYes – you can add
DONOTCACHEPAGEconstant. https://github.com/Automattic/wp-super-cache/wiki/FAQ#how-to-exclude-a-page-from-the-cacheForum: Plugins
In reply to: [WP Super Cache] Cache home page onlyWhat do the links look like? Maybe there’s another pattern you could specify.
Alternatively, you can set a
DONOTCACHEPAGEconstant to true on the pages you want to be skipped from the cache, so if you really want to only cache the home page, you can do it like this:if( !is_home() && !is_front_page() && ! defined('DONOTCACHEPAGE') ) { define('DONOTCACHEPAGE', true); }Forum: Plugins
In reply to: [WP Super Cache] cookies and caching, recently viewed productsHi @loralora,
The code isn’t going to work for users who are served cached pages because it’s never run. Caching is going to take the contents of the whole page and save re-use it for other visitors, so the code here is may even cause other visitors to see recently viewed products of other visitors.
For dynamic behavior like this, I’d recommend doing it in JavaScript and storing the titles, image URLs etc. in localStorage and then rendering them on the desired pages instead.
Alternatively, you can use dynamic page caching, but that’s going to be quite involved and you really need to know what you’re doing. Unfortunately that’s beyond the scope of what we can help with in a support forum. You can have a look at the code example for that here if you’re curious how dynamic caching works: https://github.com/Automattic/wp-super-cache/blob/trunk/plugins/dynamic-cache-test.php
Here’s another link that goes into dynamic caching in a bit more depth:
https://github.com/Automattic/wp-super-cache/wiki/How-do-I-not-cache-part-of-my-page%3F
Forum: Plugins
In reply to: [WP Super Cache] add_action the_postHi,
Cached pages aren’t going to run any hooks. The late init option is an exception – it allows you to run actions oninitbut should be used very carefully because it may impact the performance of your site.However, 404 pages are not cached, so you can use
is_404()as you normally would and if a page turns out to be a 404, that function is going to return true and the result wont be cached.Forum: Plugins
In reply to: [WP Super Cache] Quantcast ChoiceHi @nitrofox,
I’m not sure how Quantacast Choice works, where is the user choice stored? When WP Super Cache is cleared it should clear only the cached HTML pages. I think this might be a question better suited in Quantacast Forums.Forum: Plugins
In reply to: [WP Super Cache] PHP 8 $auto_release in sem_get is usedHi @sam322,
We updated support for PHP8, this refers to the changes made here: https://github.com/Automattic/jetpack/commit/f20acc689ab4bbbfacaba61c529ccb375265f8c6 to ensure that the plugin is compatible with PHP8.So don’t worry – there’s nothing that you have to do. We’re taking care of it 🙂
Forum: Plugins
In reply to: [WP Super Cache] wp_optionsHi @victor307,
Those are settings visible in the dashboard under the CDN tab in WP Super Cache settings, if you’re not using any them feel free to remove them from the database.
Forum: Plugins
In reply to: [WP Super Cache] Cache home page onlyHi @dickraney!
I’d suggest you re-think the approach here slightly. Caching is great to have wherever possible, which is the assumption caching plugins are built with. So you want every page on your site to be as fast as possible.
With that in mind – if certain areas in your site are dynamic and need to be excluded from the cache, you can exclude them using the “Rejected URL Strings” field.
I’m not sure what your IDX feed page structure is like, but let’s say it looks something like this:
https://site.com/idx/product1 https://site.com/idx/product1 https://site.com/idx/product1You can use the “Rejected URL Strings” to reject the URL like so:
/idx/*That’s going to exclude all URLs that match
/idx/from the cache.Does that solve the issue?
Hi @alovalwp,
Critical CSS isn’t generated for the admin bar because users landing on your site never see it. Am I correct in guessing that this happens only when you’re logged in?
I noticed that you’re using LiteSpeed cache – it looks like one of their performance modules might be interfering with Jetpack Boost. Can you temporarily disable the LiteSpeed cache and their optimizations (and purge cache)? Then regenerate Critical CSS in Jetpack Boost and see if that solves the problem.
If it does – then re-activate the LiteSpeed cache modules one by one until it breaks again. Once you identify the module that’s causing the incompatibility – can you please let us know which module caused the side effects?
Forum: Plugins
In reply to: [Bio Links] Plugin Breaking ThemeNo harm done 😄
Glad you got it working!
Forum: Plugins
In reply to: [Bio Links] Plugin Breaking ThemeHi @minkerr.
Do you see any error messages caused by the plugin? I tested the plugin just now and it still works with the latest WordPress version.