I am looking for the recommended way to delete an item and automatically update (modify or request again) all caches which might point to that item.
Let’s say for example I would like to delete the user “Alex”.
Alex wrote a blog post, liked another post, wrote a comment and is one of the most active users:
┌───────────────────────────────────────────────────────┐
│ │
│ My fancy Blog │
│ │
│ │
│ ┌──────────────────────────┐ ┌───────────────────┐ │
│ │ │ │ Most active users │ │
│ │ My first Post by "Alex" │ ├───────────────────┤ │
│ │ │ │ │ │
│ │ │ │ "Alex" │ │
│ └──────────────────────────┘ │ │ │
│ │ Joe │ │
│ ┌──────────────────────────┐ │ │ │
│ │ │ └───────────────────┘ │
│ │ Another post by Joe. │ │
│ │ │ │
│ │ │ │
│ ├┬────────────────────────┬┤ │
│ ││ 1 like (by "Alex") ││ │
│ └┴────────────────────────┴┘ │
│ │
│ ┌──────────────────────────┐ │
│ │ │ │
│ │ Another post by Sue. │ │
│ │ │ │
│ │ │ │
│ ├┬────────────────────────┬┤ │
│ ││ 1 like (by Joe)) ││ │
│ │┼────────────────────────┼│ │
│ ││ ││ │
│ ││ Comment by "Alex" ││ │
│ ││ ││ │
│ ││ Thanks for sharing! ││ │
│ ││ ││ │
│ └┴────────────────────────┴┘ │
│ │
└───────────────────────────────────────────────────────┘
Now for some unknown reason the user Alex has to be deleted - is there a simple way to remove “Alex” and update all parts of the page?