Fixes in CacheService, and updated CacheServiceTest