When we do an insert() on a new instance, its cache is null. This made subsequent calls to update() to throw a null reference error. Maybe it's best to actually create the cache when inserting it