apachesolr_static_response_cache
- 5
apachesolr_static_response_cache($response = NULL)
- 6
apachesolr_static_response_cache($response = NULL, $namespace = 'apachesolr_search')
It is important to hold on to the Solr response object for the duration of the
page request so that we can use it for things like building facet blocks.
@todo reverse the order of parameters in future branches.
Code
contributions/apachesolr/apachesolr.module, line 1260
<?php
function apachesolr_static_response_cache($response = NULL, $namespace = 'apachesolr_search') {
static $_response = array();
if (is_object($response)) {
$_response[$namespace] = clone $response;
}
if (!isset($_response[$namespace])) {
$_response[$namespace] = NULL;
}
return $_response[$namespace];
}
?>