Issue #1824854 by cam8001: Convert variable drupal_stale_file_threshold() to CMI system.
parent
adf2518b9f
commit
871e6bd282
|
@ -3455,7 +3455,7 @@ function drupal_clear_css_cache() {
|
|||
*/
|
||||
function drupal_delete_file_if_stale($uri) {
|
||||
// Default stale file threshold is 30 days.
|
||||
if (REQUEST_TIME - filemtime($uri) > variable_get('drupal_stale_file_threshold', 2592000)) {
|
||||
if (REQUEST_TIME - filemtime($uri) > config('system.performance')->get('preprocess.stale_file_threshold')) {
|
||||
file_unmanaged_delete($uri);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,6 @@ cache:
|
|||
preprocess:
|
||||
css: '0'
|
||||
js: '0'
|
||||
stale_file_threshold: '2592000'
|
||||
response:
|
||||
gzip: '0'
|
||||
|
|
|
@ -1909,6 +1909,7 @@ function system_update_8017() {
|
|||
'page_compression' => 'response.gzip',
|
||||
'preprocess_css' => 'preprocess.css',
|
||||
'preprocess_js' => 'preprocess.js',
|
||||
'stale_file_threshold' => 'preprocess.stale_file_threshold',
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue