rework CacheWriter writeAll() and deleteAll() to permit partial success

I'm not in love with the casting in this method. Would certainly love to know if there is some better way to do this