Added Tests for cache, added some Cache-related exceptions