Speed up when the button shows

This commit is contained in:
Owen 2025-06-03 21:04:08 -04:00
parent f438d2ddbf
commit 17919192e0
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
3 changed files with 10 additions and 19 deletions

View file

@ -154,6 +154,11 @@ async function triggerFetch(siteId: number) {
`Triggering fetch containers for site ${siteId} with Newt ${newt.newtId}`
);
fetchContainers(newt.newtId);
// clear the cache for this Newt ID so that the site has to keep asking for the containers
// this is to ensure that the site always gets the latest data
dockerSocketCache.del(`${newt.newtId}:dockerContainers`);
return { siteId, newtId: newt.newtId };
}