added an adapter factory that caches adapters per adaptee