fixing REGISTRY-2147 - Many database connections isuse during registry.get() with caching enabled