Add new option to disable profile object caching

This commit is contained in:
champsupertramp
2016-04-11 14:00:59 +08:00
parent 692baa33f3
commit b2ad5c840e
2 changed files with 16 additions and 0 deletions
+6
View File
@@ -116,6 +116,12 @@ class UM_User {
}
function get_cached_data( $user_id ) {
$disallow_cache = get_option('um_profile_object_cache_stop');
if( $disallow_cache ){
return '';
}
if ( is_numeric( $user_id ) && $user_id > 0 ) {
$find_user = get_option("um_cache_userdata_{$user_id}");
if ( $find_user ) {