text: var async=require("async");var Config=require("bower-config");var methods=require("./lib");var Cache=require("./lib/util/Cache");function RegistryClient(b,a){this._logger=a;this._config=Config.normalise(b);if(!Object.prototype.hasOwnProperty.call(this._config,"cache")){this._config.cache=this._config.storage?this._config.storage.registry:null}this._initCache()}RegistryClient.prototype.lookup=methods.lookup;RegistryClient.prototype.search=methods.search;RegistryClient.prototype.list=methods.list;RegistryClient.prototype.register=methods.register;RegistryClient.prototype.unregister=methods.unregister;RegistryClient.prototype.clearCache=function(a,b){if(typeof a==="function"){b=a;a=null}async.parallel([this.lookup.clearCache.bind(this,a),this.search.clearCache.bind(this,a),this.list.clearCache.bind(this)],b)};RegistryClient.prototype.resetCache=function(a){this.lookup.resetCache.call(this,a);this.search.resetCache.call(this,a);this.list.resetCache.call(this);return this};RegistryClient.clearRuntimeCache=function(){Cache.clearRuntimeCache()};RegistryClient.prototype._initCache=function(){var a;var b=this._config.cache;a=this.constructor._cache=this.constructor._cache||{};this._cache=a[b]=a[b]||{};this.lookup.initCache.call(this);this.search.initCache.call(this);this.list.initCache.call(this)};module.exports=RegistryClient;