[wp-trac] [WordPress Trac] #36251: Allowed memory size exhausted on wp_update_term
WordPress Trac
noreply at wordpress.org
Wed May 4 04:21:06 UTC 2016
#36251: Allowed memory size exhausted on wp_update_term
-----------------------------+-----------------------------
Reporter: rahal.aboulfeth | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version: 3.9
Severity: normal | Resolution:
Keywords: | Focuses: performance
-----------------------------+-----------------------------
Changes (by boonebgorges):
* focuses: administration, performance => performance
* version: 4.4.2 => 3.9
* milestone: Awaiting Review => Future Release
Comment:
It's necessary to bust the caches on term deletion. If a post has terms
`a` and `b`, and `b` is deleted, you have to remove the association with
`b` from the cache. I don't think there's a way around this.
The cache busting in `wp_update_term()` was introduced as part of #22526.
The reason why it's needed is the `{$taxonomy}_relationships` cache
contains arrays describing the entire term object, rather than simple term
IDs. I think it was probably originally built this way because we didn't
have decent cache support for single terms. Now we do, so we can probably
explore changing how the object relationship cache works. If it stores
only term IDs, and fetches the terms themselves from their own caches, it
should no longer be necessary to call `clean_object_term_cache()` when
updating a term.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36251#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list