Closed Darth-Fx closed 7 years ago
The tags are cached for an hour and should then disappear:
If I just remove the Cache attribute and check, then the tags belonging to the deleted post are still visible.... But that's due to not clearing the tags of the deleted post from the DB:
If I include tags in this query [ .Include(c => c.Tags) ] , and remove them, then the tags are gone and not being rendered anymore.
Correct. But you have to be careful not to delete any tags that are used by other posts.
When deleting a BlogEntry the EF will cascade delete the TagBlogEntries table but the Tags table isn't affected resulting in a lot of tag-orphans. This means that the Tags section (sidebar) is stil displaying the deleted Tags (effective after an hour or application restart).
I've fixed it by adding Tag deletion code in the HandleAsync of the DeleteBlogEntryCommandHandler but maybe I'm overlooking something.....
By the way, why the 3600 cacheduration on the sidebar? Great project!