Skip to content

Commit 6333cb6

Browse files
swissspidyclaude
andcommitted
Flush the object cache before checking the title in the SQLite --where scenario
The scenario reads the post title before the replacement, which puts it in a persistent object cache, and search-replace does not flush that cache (it only reminds to run `wp cache flush`), so the check after the replacement read the old title in the SQLite (Obj Cache) jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
1 parent 9df13d2 commit 6333cb6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎features/search-replace-where.feature‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,9 @@ Feature: Test search-replace --where option
721721
Success: Made 1 replacement.
722722
"""
723723

724-
When I run `wp post get {POST_ID} --field=title`
724+
# The title was read above, so a persistent object cache still holds the old one.
725+
When I run `wp cache flush`
726+
And I run `wp post get {POST_ID} --field=title`
725727
Then STDOUT should be:
726728
"""
727729
Title bar

0 commit comments

Comments
 (0)