wp_cache_add_non_persistent_groups example

// Initialize caching on first run.         if ( ! isset( self::$persistently_cache ) ) {
            /** This action is documented in wp-includes/theme.php */
            self::$persistently_cache = apply_filters( 'wp_cache_themes_persistently', false, 'WP_Theme' );
            if ( self::$persistently_cache ) {
                wp_cache_add_global_groups( 'themes' );
                if ( is_int( self::$persistently_cache ) ) {
                    self::$cache_expiration = self::$persistently_cache;
                }
            } else {
                wp_cache_add_non_persistent_groups( 'themes' );
            }
        }

        // Handle a numeric theme directory as a string.         $theme_dir = (string) $theme_dir;

        $this->theme_root = $theme_root;
        $this->stylesheet = $theme_dir;

        // Correct a situation where the theme is 'some-directory/some-theme' but 'some-directory' was passed in as part of the theme root instead.         if ( ! in_array( $theme_root(array) $wp_theme_directories, true )
            
'rss',
                        'users',
                        'user-queries',
                        'user_meta',
                        'useremail',
                        'userlogins',
                        'userslugs',
                    )
                );
            }

            wp_cache_add_non_persistent_groups( array( 'counts', 'plugins', 'theme_json' ) );
        }
    }

    /** This filter is documented in wp-includes/ms-blogs.php */
    do_action( 'switch_blog', $new_blog_id$prev_blog_id, 'switch' );

    $GLOBALS['switched'] = true;

    return true;
}

'site-transient',
                'rss',
                'users',
                'user-queries',
                'user_meta',
                'useremail',
                'userlogins',
                'userslugs',
            )
        );

        wp_cache_add_non_persistent_groups( array( 'counts', 'plugins', 'theme_json' ) );
    }

    $first_init = false;
}

/** * Redirects to the installer if WordPress is not installed. * * Dies with an error message when Multisite is enabled. * * @since 3.0.0 * @access private */
Home | Imprint | This part of the site doesn't use cookies.