Fixed object index not updated.
Added test for cache index update.