Make WordPress Core


Ignore:
Timestamp:
10/19/2020 09:49:58 PM (4 years ago)
Author:
helen
Message:

Multisite: More specific caching for get_dirsize.

Instead of one cache entry for all upload folders for a site on multisite, this now caches for each folder and invalidates that cache based on context. In multisite, this should speed up get_dirsize calls since older directories that are much less likely to change will no longer have the size recalculated.

Props janthiel, A5hleyRich, batmoo.
Fixes #19879.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r49193 r49212  
    59155915
    59165916    if ( is_multisite() ) {
    5917         delete_transient( 'dirsize_cache' );
     5917        invalidate_dirsize_cache( $file );
    59185918    }
    59195919
Note: See TracChangeset for help on using the changeset viewer.