[wp-trac] [WordPress Trac] #63070: Flushing object cache removes all transients
WordPress Trac
noreply at wordpress.org
Wed Apr 23 15:18:31 UTC 2025
#63070: Flushing object cache removes all transients
-------------------------+------------------------------
Reporter: deploysk | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: close | Focuses: performance
-------------------------+------------------------------
Changes (by flixos90):
* keywords: => close
Comment:
@deploysk Thank you for reporting this, and welcome to Trac.
After considering the ticket, I am not sure it makes sense for WordPress
Core, for the following reasons:
* Transients are caches, just like other data in object cache. From that
perspective, I don't see why flushing the cache shouldn't flush transients
too.
* The benefit of transients is that they also work on sites without an
object cache.
* A `wp_cache_flush()` call by its name implies that caches are cleared.
So it does not sound right to me to leave transients in place when this
function is called.
* Even if we wanted to implement it, technical limitations may make it
tricky or even impossible. It would require a mechanism that deletes all
object cache groups except the transient groups. The alternative would be
to store transients in the database ''always'', but that is a no-go for
big sites where the database for transients could lead to performance
issues.
Would like to hear other people's feedback, but I'm leaning towards
closing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63070#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list