set_found_sites example

        unset( $_args['fields']$_args['update_site_cache']$_args['update_site_meta_cache'] );

        $key          = md5( serialize( $_args ) );
        $last_changed = wp_cache_get_last_changed( 'sites' );

        $cache_key   = "get_sites:$key:$last_changed";
        $cache_value = wp_cache_get( $cache_key, 'site-queries' );

        if ( false === $cache_value ) {
            $site_ids = $this->get_site_ids();
            if ( $site_ids ) {
                $this->set_found_sites();
            }

            $cache_value = array(
                'site_ids'    => $site_ids,
                'found_sites' => $this->found_sites,
            );
            wp_cache_add( $cache_key$cache_value, 'site-queries' );
        } else {
            $site_ids          = $cache_value['site_ids'];
            $this->found_sites = $cache_value['found_sites'];
        }

        
Home | Imprint | This part of the site doesn't use cookies.