Fixed exception when writing to cache with an uncached service