CodeExplorer set_found_networks example
unset( $_args['fields'
],
$_args['update_network_cache'
] );
$key =
md5( serialize( $_args ) );
$last_changed =
wp_cache_get_last_changed( 'networks'
);
$cache_key = "get_network_ids:
$key:
$last_changed";
$cache_value =
wp_cache_get( $cache_key, 'network-queries'
);
if ( false ===
$cache_value ) { $network_ids =
$this->
get_network_ids();
if ( $network_ids ) { $this->
set_found_networks();
} $cache_value = array
( 'network_ids' =>
$network_ids,
'found_networks' =>
$this->found_networks,
);
wp_cache_add( $cache_key,
$cache_value, 'network-queries'
);
} else { $network_ids =
$cache_value['network_ids'
];
$this->found_networks =
$cache_value['found_networks'
];
}