Make WordPress Core


Ignore:
Timestamp:
10/19/2020 09:49:58 PM (6 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-admin/includes/file.php

    r49193 r49212  
    929929
    930930        if ( is_multisite() ) {
    931                 delete_transient( 'dirsize_cache' );
     931                invalidate_dirsize_cache( $new_file );
    932932        }
    933933
Note: See TracChangeset for help on using the changeset viewer.