Support #14994
closedClear Cache on CDEV
Added by scott voth almost 3 years ago. Updated 3 months ago.
0%
Description
Things are off on the Dev site again. Can you clear CDEV cache?
Related issues
Updated by Raymond Hoh almost 3 years ago
- Related to Bug #14908: Stale object cache on cdev added
Updated by Raymond Hoh almost 3 years ago
- Status changed from New to Resolved
- Assignee changed from Boone Gorges to Raymond Hoh
- Target version set to Not tracked
Hi Scott,
I've just cleared the options object cache on cdev and things are back to normal again.
Updated by Colin McDonald almost 3 years ago
Hello, I think that this is happening again. Cdev on my end is all thrown off with layout, missing content, etc. Let me know if you need screenshots.
Updated by Colin McDonald almost 3 years ago
- Status changed from Resolved to In Progress
Updated by Raymond Hoh almost 3 years ago
Hi Colin,
I've just purged the options object cache on cdev and cdev should be accessible again.
Updated by Colin McDonald almost 3 years ago
This issue seems to be back, unfortunately, if we can try clearing the cache again. I don't know if there's an easier way here, since we'll probably be in and out of testing for the next week or two at least.
Updated by Boone Gorges almost 3 years ago
We have a concatenation trick to ensure unique cache salts across instances:
define( 'WP_CACHE_KEY_SALT', DB_NAME . ':' . strtolower( constant( 'ENV_TYPE' ) ) . ':' );
I wonder whether there's something in our memcached config that breaks because of this, maybe because the salt is too long or contains weird characters. As a workaround, I've temporarily disabled (commented out) this feature on cdev, and in cac-env-config.php, I've hardcoded a salt:
define( 'WP_CACHE_KEY_SALT', 'cdev' );
Let's see if this does anything.
Updated by Colin McDonald almost 3 years ago
Thanks Boone, looking good for me so far.
Updated by Colin McDonald almost 3 years ago
I think I spoke too soon, cdev/cache seem to have reverted. Not sure if this helps, but scrolling to the very bottom of the homepage just now (logged in), it has the Wordpress error "There has been a critical error on this website."
Updated by Boone Gorges almost 3 years ago
Ah! Colin, I think you may have found the culprit, which is not linked to the cache at all, but to the fact that the cache occasionally expires and the markup needs to be generated, but the cac-home-curation plugin was not activated on cdev for some reason. I've activated it.
Updated by Colin McDonald almost 3 years ago
Great, glad that helped! So far so good now.
Updated by scott voth almost 3 years ago
I see again that the cache needs to be cleared.
Updated by Colin McDonald almost 3 years ago
The "critical error" message is back at the bottom too.
Updated by Raymond Hoh almost 3 years ago
I just cleared the options object cache on cdev again.
Updated by Colin McDonald almost 3 years ago
Thanks, Ray. I'm wondering if this popping back up, and with that "critical error" message, tells us anything more about the underlying issue and how to keep the dev site rendering well consistently, at least while we're in a testing period. Or is this just something we'll need to keep asking to have cleared as it comes up?
Updated by Raymond Hoh almost 3 years ago
I've added a workaround that detects if the CAC Home Curation plugin is active or not. If it isn't, we'll delete the options object cache.
Boone, here's the code snippet:
add_action( 'get_header', function() { if ( ! is_main_site() ) { return; } require_once ABSPATH . 'wp-admin/includes/plugin.php'; if ( ! is_plugin_active( 'cac-home-curation/plugin.php' ) ) { wp_cache_delete( 'alloptions', 'options' ); wp_redirect( get_home_url() ); die(); } }, 0 );
It's in mu-plugins/ray.php
.
Updated by scott voth almost 3 years ago
Everything looks good to me except the footer looks like it lost its styling.
Updated by scott voth almost 3 years ago
Actually, it looks fine in another browswer. Sorry - I have to clear my own cache.
Updated by Raymond Hoh 3 months ago
- Status changed from In Progress to Resolved
Closing this one due to age and that we're no longer experiencing this caching problem on cdev.