You are here

protected function SearchApiSolrConnection::getCacheId in Search API Solr 7

Computes the cache ID to use for this connection.

Parameters

$suffix: (optional) A suffix to append to the string to make it unique.

Return value

string|null The cache ID to use for this connection and usage; or NULL if no caching should take place.

4 calls to SearchApiSolrConnection::getCacheId()
SearchApiSolrConnection::clearCache in includes/solr_connection.inc
Clears the cached Solr data.
SearchApiSolrConnection::setLuke in includes/solr_connection.inc
Sets $this->luke with the metadata about the index from admin/luke.
SearchApiSolrConnection::setStats in includes/solr_connection.inc
Stores information about the Solr core in $this->stats.
SearchApiSolrConnection::setSystemInfo in includes/solr_connection.inc
Call the /admin/system servlet to retrieve system information.

File

includes/solr_connection.inc, line 291

Class

SearchApiSolrConnection
Represents a Solr server resource.

Code

protected function getCacheId($suffix = '') {
  if (!empty($this->options['server'])) {
    $cid = $this->options['server'];
    return $suffix ? "{$cid}:{$suffix}" : $cid;
  }
}