working cache manager (with test)