You are here

public function Drupal_Apache_Solr_Service::__construct in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 Drupal_Apache_Solr_Service.php \Drupal_Apache_Solr_Service::__construct()
  2. 6.2 Drupal_Apache_Solr_Service.php \Drupal_Apache_Solr_Service::__construct()

Put Luke meta-data from the cache into $this->luke when we instantiate.

Overrides Apache_Solr_Service::__construct

See also

Apache_Solr_Service::__construct()

File

./Drupal_Apache_Solr_Service.php, line 250

Class

Drupal_Apache_Solr_Service

Code

public function __construct($host = 'localhost', $port = 8180, $path = '/solr/') {
  parent::__construct($host, $port, $path);
  $this->luke_cid = "apachesolr:luke:" . md5($this->_lukeUrl);
  $cache = cache_get($this->luke_cid, 'cache_apachesolr');
  if (isset($cache->data)) {
    $this->luke = unserialize($cache->data);
  }
}