Skip to content

Publish: Cloudflare cache not purged, new skills not discoverable immediately #400

@elad12390

Description

@elad12390

Summary

After a user publishes a skill, searching for it on the registry immediately after does not return the new skill. The search results appear to be served from Cloudflare's cache, which is not purged on publish.

Users report publishing a skill and then checking the search / browse pages right after, only to not see their skill. This creates the impression that publishing failed or that the registry is broken.

Current Behavior

  1. User runs tank publish and the CLI reports success.
  2. The skill is written to the database and storage correctly.
  3. User navigates to the registry (e.g. https://www.tankpkg.dev) and searches for their skill.
  4. Search results come back from Cloudflare's edge cache and do not include the newly published skill.
  5. User assumes their publish failed.

Expected Behavior

After a successful publish, the relevant Cloudflare cache entries (skill list / search / detail pages, and any cached API responses) should be purged so the new skill is discoverable immediately.

Suggested Fix

On successful publish (in the publish API handler in apps/registry/src/api/), trigger a Cloudflare cache purge for the affected URLs / cache tags. Options:

  • Use Cloudflare's Purge by URL for the specific skill detail page + search/browse endpoints.
  • Better: tag cached responses with a Cache-Tag header (e.g. skills-list, skill:<slug>) and Purge by Tag on publish. Requires Enterprise or the appropriate plan — verify plan level first.
  • Alternative: bypass cache for search endpoints and keep it only on truly static assets.

Whichever path: make it part of the publish transaction (or a non-blocking post-publish hook) so users see their skill immediately after tank publish returns success.

Acceptance Criteria

  • Publishing a skill invalidates the Cloudflare cache for search / list / detail pages.
  • A user who publishes and searches within 5 seconds sees their skill.
  • Cache purge failures are logged but do not fail the publish itself (non-blocking).
  • Works for both www.tankpkg.dev (stable) and nightly.tankpkg.dev (nightly).

Environment

  • Registry: apps/registry (TanStack Start, deployed to Vercel behind Cloudflare).
  • Affected endpoints: skill search, skill list / browse, skill detail pages, and any JSON API consumed by the web UI.

Notes

  • Confirm which CF zone(s) need purging (stable + nightly).
  • Decide purge-by-URL vs purge-by-tag (tag is cleaner; check plan eligibility).
  • Consider also adding Cache-Control: s-maxage=... , stale-while-revalidate=... so stale content is short-lived as a defense-in-depth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highHigh priority issueregistryRegistry web app (apps/registry)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions