The updated delay is not delete has more advantages? (don't in front of the redundant delete)
Delay in the double delete to delete applies only in the case of the figure below, but as long as there is a thread before operation database success in reading dirty data is not invalid,
A little this feeling: when high concurrency useless, small concurrent time don't need,
Finally: delete the first step is it worth it?
CodePudding user response:
Just found a reasonable answer: only after the delete, could be done in updating the database -- "delete old cache, this paragraph of time have dirty data,But I want to say is, first is not put an end to update the database to complete - to delete "to delete the old cache this time there are dirty data,
Should delete cache read requests to come in, after the cache still will be covered by the old data,