mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 18:25:28 -05:00
Optimize image API invalidation tags and simplify cache invalidation logic
Co-authored-by: kent <kent@invoke.ai>
This commit is contained in:
committed by
Kent Keirsey
parent
324b6e2af4
commit
6f12fd22b9
@@ -270,25 +270,13 @@ export const imagesApi = api.injectEndpoints({
|
||||
// Don't add it to anything
|
||||
return [];
|
||||
}
|
||||
const categories = getCategories(result);
|
||||
const boardId = result.board_id ?? 'none';
|
||||
|
||||
return [
|
||||
{
|
||||
type: 'ImageList',
|
||||
id: getListImagesUrl({
|
||||
board_id: boardId,
|
||||
categories,
|
||||
}),
|
||||
},
|
||||
{
|
||||
type: 'Board',
|
||||
id: boardId,
|
||||
},
|
||||
{
|
||||
type: 'BoardImagesTotal',
|
||||
id: boardId,
|
||||
},
|
||||
...getTagsToInvalidateForImageMutation([result.image_name]),
|
||||
...getTagsToInvalidateForBoardAffectingMutation([boardId]),
|
||||
'ImageCollectionCounts',
|
||||
{ type: 'ImageCollection', id: LIST_TAG },
|
||||
];
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user