You are here

function redis_path_backend_get in Redis 7.2

Same name and namespace in other branches
  1. 7.3 redis.path.inc \redis_path_backend_get()

Get Redis path lookup backend.

Return value

Redis_Path_HashLookupInterface

1 call to redis_path_backend_get()
drupal_lookup_path in ./redis.path.inc
Given an alias, return its Drupal system URL if one exists. Given a Drupal system URL return one of its aliases if such a one exists. Otherwise, return FALSE.

File

./redis.path.inc, line 15
Drupal default includes/path.inc file copy which only differs in:

Code

function redis_path_backend_get() {
  static $hashLookup;
  if (null === $hashLookup) {
    try {
      $className = Redis_Client::getClass(Redis_Client::REDIS_IMPL_PATH);
      $hashLookup = new $className();
    } catch (Exception $e) {
      $hashLookup = new Redis_Path_NullHashLookup();
    }
  }
  return $hashLookup;
}