You are here

function nas_memcache_add in Search API live results 7

1 call to nas_memcache_add()
search_api_live_results.results.php in ./search_api_live_results.results.php

File

./search_api_live_results.results.php, line 32

Code

function nas_memcache_add($bin, $port, $key, $value, $compress = MEMCACHE_COMPRESSED, $expire) {
  try {
    if (class_exists('Memcache')) {
      $mc = new Memcache();
      $mc
        ->connect($bin, $port);
      $mc
        ->add($key, $value, $compress, $expire);
    }
  } catch (Exception $e) {
  }
}