Opened 13 days ago
Last modified 13 days ago
#62111 new defect (bug)
The cache of the embed seems weird
Reported by: | arthur791004 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
I found the cache of the embed seems weird.
Referring to https://github.com/WordPress/wordpress-develop/blob/7f4fd30dffdfe8d7d817c2cdb4ab98408f1c0add/src/wp-includes/class-wp-embed.php#L272, the cache won't be expired even if the value of $cached_recently
is false because there is no place to set the $this->usecache
to false except the cache_oembed
function.
if ( $this->usecache || $cached_recently ) { ... }
The goal of the cache_oembed
function seems to reset all the cache to the latest value. However, when triggering the cache_oembed
function, if the cache is not expired, the cache won't be force-updated.
As a result, it seems to be correct if we change the condition from ||
to &&
. Does it make sense?
Change History (1)
This ticket was mentioned in PR #7434 on WordPress/wordpress-develop by @arthur791004.
13 days ago
#1
- Keywords has-patch added
Fix the cache of the embed won't be expired forever
Trac ticket: https://core.trac.wordpress.org/ticket/62111