Fixed bugs in TileCacheService and WaveFormCacheService.

- Updated TileCacheServiceTest.