Subject: [PATCH] Add year expiration to dirsize_cache transient so that it is not autoloaded
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
a
|
b
|
|
8318 | 8318 | |
8319 | 8319 | // Only write the transient on the top level call and not on recursive calls. |
8320 | 8320 | if ( $save_cache ) { |
8321 | | set_transient( 'dirsize_cache', $directory_cache ); |
| 8321 | set_transient( 'dirsize_cache', $directory_cache, YEAR_IN_SECONDS ); |
8322 | 8322 | } |
8323 | 8323 | |
8324 | 8324 | return $size; |
… |
… |
|
8358 | 8358 | strpos( $path, '\\' ) === false |
8359 | 8359 | ) { |
8360 | 8360 | unset( $directory_cache[ $path ] ); |
8361 | | set_transient( 'dirsize_cache', $directory_cache ); |
| 8361 | set_transient( 'dirsize_cache', $directory_cache, YEAR_IN_SECONDS ); |
8362 | 8362 | return; |
8363 | 8363 | } |
8364 | 8364 | |
… |
… |
|
8377 | 8377 | unset( $directory_cache[ $path ] ); |
8378 | 8378 | } |
8379 | 8379 | |
8380 | | set_transient( 'dirsize_cache', $directory_cache ); |
| 8380 | set_transient( 'dirsize_cache', $directory_cache, YEAR_IN_SECONDS ); |
8381 | 8381 | } |
8382 | 8382 | |
8383 | 8383 | /** |