Pass false returned for timed out transients through transient_$transient filter.
This brings the same behaviour as external object caches to the default database backend. Props johnbillion. Fixes #24685. git-svn-id: https://develop.svn.wordpress.org/trunk@25075 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d71f11bdd7
commit
790f9feb68
@ -461,11 +461,12 @@ function get_transient( $transient ) {
|
||||
if ( get_option( $transient_timeout ) < time() ) {
|
||||
delete_option( $transient_option );
|
||||
delete_option( $transient_timeout );
|
||||
return false;
|
||||
$value = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! isset( $value ) )
|
||||
$value = get_option( $transient_option );
|
||||
}
|
||||
|
||||
@ -1029,10 +1030,11 @@ function get_site_transient( $transient ) {
|
||||
if ( false !== $timeout && $timeout < time() ) {
|
||||
delete_site_option( $transient_option );
|
||||
delete_site_option( $transient_timeout );
|
||||
return false;
|
||||
$value = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! isset( $value ) )
|
||||
$value = get_site_option( $transient_option );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user