caching factory base class