Added default cache factory, caching, and tests.