-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding OrderTableDatastore and Meta caching integration #46023
Open
prettyboymp
wants to merge
29
commits into
trunk
Choose a base branch
from
fix/45550-cache-orders-at-datastore-layer
base: trunk
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+451
−123
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
5b732f8
Adding initial handling for OrderTableDatastore caching integration
prettyboymp 99ed80b
fix ::cache_objects() mapping usage
prettyboymp 0b79a82
Extend the WPCacheEngineTest tests to cover new multi-set/get methods
prettyboymp 93cda51
Clear order data cache after ::persist_order_to_db()
prettyboymp 1ed6f97
clear child order cache after a direct parent_order_id update
prettyboymp 5b31713
make sure we clear cache after any direct db writes
prettyboymp 52550a0
simplify interface to clear object cache
prettyboymp 0584c40
add changelog
prettyboymp 40875d4
fixing lint errors
prettyboymp 8492c59
more lint fixes
prettyboymp c407d7b
continuing lint fixes
prettyboymp cbd5e38
additional lint fixes
prettyboymp 1c7ac9f
Merge branch 'trunk' into fix/45550-cache-orders-at-datastore-layer
prettyboymp 2aaa3d3
fix typo in test
prettyboymp 36ef5f0
Merge branch 'trunk' into fix/45550-cache-orders-at-datastore-layer
prettyboymp a4d1163
Merge branch 'trunk' into fix/45550-cache-orders-at-datastore-layer
prettyboymp e6a4445
Merge branch 'trunk' into fix/45550-cache-orders-at-datastore-layer
prettyboymp 7373c72
Adding cache invalidation after OrderTable deletion
prettyboymp 7bdb27b
Add test to verify cache invalidation after order migration
prettyboymp 9d553c7
lint fixes
prettyboymp 2629f31
lint fixes
prettyboymp 3187faa
Merge branch 'trunk' into fix/45550-cache-orders-at-datastore-layer
prettyboymp 144ff44
update test_get_order_doesnt_return_invalid_cached_order after #46393…
prettyboymp 3111137
lint fixes
prettyboymp 22f2898
fix bug where partially cached set didn't correctly load uncached orders
prettyboymp c4e2746
Merge branch 'trunk' into fix/45550-cache-orders-at-datastore-layer
prettyboymp e4b252b
Merge branch 'trunk' into fix/45550-cache-orders-at-datastore-layer
prettyboymp b5780b5
changing CustomMetaDataStore::get_cache_group() to non-abstract metho…
prettyboymp 86d6af2
Attempt to retrieve order types from cache prior to querying
prettyboymp File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
plugins/woocommerce/changelog/fix-45550-cache-orders-at-datastore-layer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: performance | ||
|
||
Added caching to HPOS Data Stores |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why is this required? Wouldn't the object be correctly cached at this point? (and same for cache invalidation at line 112)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
PostsToOrdersMigrationController
runs direct queries against the tables/data theOrdersTableDatastore
isn't managed by theOrdersTableDatastore
manages without running those queries through it. So there is nothing in that chain that would clear the object in the datastore's cache. We need to explicitly invalidate the cache for those objects since we're modifying data outside of the datastore context.