Skip to content

feat: add clear cache button to publish - #494

Merged
tristan-mouchet merged 1 commit into
developfrom
feat/clear-cache-button
Aug 13, 2026
Merged

feat: add clear cache button to publish#494
tristan-mouchet merged 1 commit into
developfrom
feat/clear-cache-button

Conversation

@tristan-mouchet

Copy link
Copy Markdown
Collaborator

Summary

Adds a "Clear cache" button to the publish popover so users can force a full cache purge of their published website. It appears next to the Publish/Update button only once the site has been published, and is guarded by a confirmation dialog that explains when and why it's needed.

Changes

  • Add a clear-cache icon button beside the Publish/Update button in PublishPopover, shown only when the site is already published
  • Wire it to the existing cacheApi.clearAll() helper (POST /ycode/api/cache/clear-all) — no new backend code
  • Add a confirmation dialog explaining that clearing is normally unnecessary (publishing already refreshes changed pages), is mainly useful for websites with many pages, and that the first visit to each page is slower until it's cached again
  • Reuse existing patterns: spinner/success states, toast feedback, and a tooltip for the icon-only button

Test plan

  • On an unpublished site, confirm only the Publish button shows (no clear-cache button)
  • After publishing, confirm the clear-cache button appears beside Update
  • Click it and confirm the dialog opens with the explanatory copy
  • Confirm "Clear cache" purges the cache (success toast) and the dialog blocks interaction while in progress
  • Confirm "Cancel" closes the dialog without clearing

Let users force a full cache purge of the published site from the
publish popover once the site is live. Guarded by a confirmation
dialog explaining it is only useful for large sites and that pages
are slower on first visit until cached again.
@tristan-mouchet tristan-mouchet added the Feature request A new feature request label Aug 13, 2026
@tristan-mouchet tristan-mouchet added the Feature request A new feature request label Aug 13, 2026
@tristan-mouchet tristan-mouchet self-assigned this Aug 13, 2026
@tristan-mouchet
tristan-mouchet merged commit ea75cae into develop Aug 13, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature request A new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant