InMemoryRasterTileCache.GetTile throws KeyNotFoundException when the tile is not in the cache:
TileCache cache1 = new FileRasterTileCache();
TileCache cache2 = new EncryptedFileRasterTileCache();
TileCache cache3 = new InMemoryRasterTileCache();
cache1.GetTile(123, 456, 789); // returns a tile with Bitmap==null
cache2.GetTile(123, 456, 789); // returns null
cache3.GetTile(123, 456, 789); // crashes
I do not know what the correct return value for that case should be, but classes like WmtsLayer do not expect an exception, and do not draw any tiles.