Implemented cache only mode and updated unit tests