You are here

function apachesolr_static_response_cache in Apache Solr Search 5

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_static_response_cache()
  2. 5.2 apachesolr.module \apachesolr_static_response_cache()
  3. 6.3 apachesolr.module \apachesolr_static_response_cache()
  4. 6 apachesolr.module \apachesolr_static_response_cache()
  5. 6.2 apachesolr.module \apachesolr_static_response_cache()
  6. 7 apachesolr.module \apachesolr_static_response_cache()

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.

6 calls to apachesolr_static_response_cache()
apachesolrlang_block in contrib/apachesolr_lang/apachesolrlang.module
Implementation of hook_block().
apachesolr_block in ./apachesolr.module
Implementation of hook_block().
apachesolr_multisitesearch_block in contrib/apachesolr_multisitesearch/apachesolr_multisitesearch.module
Implementation of hook_block().
apachesolr_multisitesearch_search in contrib/apachesolr_multisitesearch/apachesolr_multisitesearch.module
Implementation of hook_search().
apachesolr_search_block in ./apachesolr_search.module
Implementation of hook_block().

... See full list

File

./apachesolr.module, line 721
Integration with the Apache Solr search application.

Code

function &apachesolr_static_response_cache($response = NULL) {
  static $_response;
  if (!empty($response)) {
    $_response = drupal_clone($response);
  }
  return $_response;
}