[wp-trac] [WordPress Trac] #57625: WP_Query cache memory leak
WordPress Trac
noreply at wordpress.org
Tue Feb 7 07:26:56 UTC 2023
#57625: WP_Query cache memory leak
--------------------------+------------------------------
Reporter: owi | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cache API | Version:
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------+------------------------------
Comment (by owi):
@peterwilsoncc I am not a maintainer of any of the persistent storage
plugins so can't say anything in their name but I have few notes which may
give some insights from my perspective.
Notes are in no particular order :) :
- AFAIK the selective keys removal (in Redis) is an atomic operation of
O(n) complexity and might take a while to execute - do we want that to
happen on an action? What are possible side effects if that gets stuck?
Most probably an action can be async (depending on plugin and engine) but
still that could pose certain problems especially when actions pile up.
- As the same issue happens with the `get_terms` cache therefore we should
plan for building the same action for both cases.
- On one hand it is a proper approach to shift that work to plugin
developers so they can use native methods to resolve flushing (as who
knows their storage engine better?). On the other hand - do we want such
critical functionality to be implemented in 50 different ways?
- and lastly I am not a maintainer but I can imagine that some of them may
say that it is a Core issue (because, frankly, it is) and please ask Core
devs to fix it.
I think that such mass operation most probably should be detached from a
regular WP request and happen on cron or similar.
I am going to open a ticket within my favourite plugin - `redis-cache` and
ask whats their opinion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57625#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list