cache index on write