Invalidate count cache on entity update

This commit is contained in:
mikiher 2025-02-21 09:45:10 +02:00
parent 0cc2e39367
commit e8b60defb6
3 changed files with 12 additions and 0 deletions

View file

@ -201,6 +201,10 @@ class Book extends Model {
Book.addHook('afterCreate', async (instance) => {
libraryItemsBookFilters.clearCountCache('afterCreate')
})
Book.addHook('afterUpdate', async (instance) => {
libraryItemsBookFilters.clearCountCache('afterUpdate')
})
}
/**