Skip to content

Comments

Refresh minimal-embeds cache when "Refresh embed cache" action is called#314

Merged
geoff-maddock merged 3 commits intomainfrom
copilot/refresh-minimal-embeds-cache
Dec 1, 2025
Merged

Refresh minimal-embeds cache when "Refresh embed cache" action is called#314
geoff-maddock merged 3 commits intomainfrom
copilot/refresh-minimal-embeds-cache

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

The "Refresh embed cache" action only refreshed the standard embeds cache, leaving the minimal-embeds cache stale. Cards using useMinimalEmbeds hook couldn't access updated data.

Changes

  • EventDetail.tsx / EntityDetail.tsx: Updated handleClearEmbedCache to:
    • Clear both embeds and minimal-embeds cache entries
    • Fetch and cache data from both endpoints (/{resource}/{slug}/embeds and /{resource}/{slug}/minimal-embeds)
// Clear both cache types
clearEmbedCache('events', event.slug, 'embeds');
clearEmbedCache('events', event.slug, 'minimal-embeds');

// Fetch and cache both
const { data } = await api.get<{ data: string[] }>(`/events/${event.slug}/embeds`);
setEmbedCache('events', event.slug, data.data || [], 'embeds');

const { data: minimalData } = await api.get<{ data: string[] }>(`/events/${event.slug}/minimal-embeds`);
setEmbedCache('events', event.slug, minimalData.data || [], 'minimal-embeds');

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • test.api
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development /home/REDACTED/work/arcane-city-frontend/arcane-city-frontend/node_modules/tinypool/dist/entry/process.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Refresh the minimal-embeds cache as well when "Refresh embed cache" action is called</issue_title>
<issue_description>The "Refresh embed cache" currently refreshes the standard embeds cache, but not the minimal-embeds cache, which has it's own key and hits it's own endpoints. I'd like this to be refreshed at once so that the cards that use the minimal embeds can access the data in local storage.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Nov 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arcane-city-frontend Ready Ready Preview Comment Nov 27, 2025 1:03am

Co-authored-by: geoff-maddock <55493+geoff-maddock@users.noreply.github.com>
Co-authored-by: geoff-maddock <55493+geoff-maddock@users.noreply.github.com>
Copilot AI changed the title [WIP] Refresh minimal-embeds cache on embed cache action Refresh minimal-embeds cache when "Refresh embed cache" action is called Nov 27, 2025
Copilot AI requested a review from geoff-maddock November 27, 2025 01:05
@geoff-maddock geoff-maddock marked this pull request as ready for review December 1, 2025 18:22
@geoff-maddock geoff-maddock merged commit ac57b42 into main Dec 1, 2025
16 checks passed
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

📦 Build Size Report

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

✅ PR Checks Complete

Tests Status: success
Node.js Version: 20.x
Commit: b926935

All tests in src/__tests__ have been executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refresh the minimal-embeds cache as well when "Refresh embed cache" action is called

2 participants