fix: purge Divi uploads cache on clone#1403
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR enhances Divi static CSS cache clearing to discover and delete caches across multiple locations (network-scoped paths, legacy paths, and uploads-based fallbacks) while maintaining per-site isolation. The core methods now exchange structured location data and use explicit safety roots, validated by a new multisite test. ChangesDivi Cache Purge Improvements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
wp_upload_dir()['basedir']/et-cache).wp-content/et-cache/{network_id}/{blog_id}and legacywp-content/et-cache/{blog_id}purge paths.Verification
vendor/bin/phpunit --filter General_Compat_Test— OK, 4 tests / 7 assertions.vendor/bin/phpcs inc/compat/class-general-compat.php tests/WP_Ultimo/General_Compat_Test.php— OK.vendor/bin/phpstan analyse inc/compat/class-general-compat.php tests/WP_Ultimo/General_Compat_Test.php— OK./home/dave/Divi.zip(Divi 4.27.6): created Divi template site, cloned viaSite_Duplicator::duplicate_site(), verified cloned page regenerates the required.et_pb_section_0/.et_pb_image_0CSS rules.wp-content/et-cache/1/{blog_id}anduploads/sites/{blog_id}/et-cache;do_action('wu_duplicate_site', ['from_site_id' => 58, 'site_id' => 60])removed both cloned-site cache directories.aidevops.sh v3.20.53 plugin for OpenCode v1.17.3 with gpt-5.5
Summary by CodeRabbit
Release Notes