WordPress.org

Make WordPress Core

Ticket #41297: 41297.patch

File 41297.patch, 631 bytes (added by ivankristianto, 3 years ago)

Ensure to clear cache when cache is expired

  • src/wp-includes/class-wp-embed.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    218218
    219219                        $cached_recently = ( time() - $cache_time ) < $ttl;
    220220
    221                         if ( $this->usecache || $cached_recently ) {
     221                        if ( $this->usecache && $cached_recently ) {
    222222                                // Failures are cached. Serve one if we're using the cache.
    223223                                if ( '{{unknown}}' === $cache )
    224224                                        return $this->maybe_make_link( $url );