mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Add new option to disable profile object caching
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
@@ -1934,6 +1934,16 @@ $this->sections[] = array(
|
||||
'full_width' => true,
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'um_profile_object_cache_stop',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Stop caching user\'s profile data','ultimatemember' ),
|
||||
'default' => 0,
|
||||
'desc' => __('Turn off If you have performance issue.','ultimatemember'),
|
||||
'on' => __('On','ultimatemember'),
|
||||
'off' => __('Off','ultimatemember'),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'um_flush_stop',
|
||||
'type' => 'switch',
|
||||
|
||||
Reference in New Issue
Block a user