code: function getCacheByHref(cacheManager, href) {
  
    var region = null;
  
    //href is almost never null, but it is in the case of an AuthenticationResult (at the moment), so check for existence:
    //see: https://github.com/stormpath/stormpath-sdk-node/issues/11
    if (href) {
      region = href.match(/customData/) ? 'customData' : (href.split('/').slice(-2)[0]);
    }
  
    if (!region || CACHE_REGIONS.indexOf(region) === -1) {
      return disabledCache;
    }
  
    return cacheManager.getCache(region) || new DisabledCache();
  }
docs: private function: