-
Notifications
You must be signed in to change notification settings - Fork 0
Tag-based cache invalidation worker #94
Copy link
Copy link
Closed
Labels
area:cacheCache layers + invalidationCache layers + invalidationarea:jobsBackground jobs, cronBackground jobs, cronarea:workerBackground workers (Asynq)Background workers (Asynq)phase:P3-themesPhase 3 — ThemesPhase 3 — Themespriority:P1Important — should land in phaseImportant — should land in phaseskill:goGo programmingGo programmingtype:featNew feature or implementation taskNew feature or implementation task
Milestone
Metadata
Metadata
Assignees
Labels
area:cacheCache layers + invalidationCache layers + invalidationarea:jobsBackground jobs, cronBackground jobs, cronarea:workerBackground workers (Asynq)Background workers (Asynq)phase:P3-themesPhase 3 — ThemesPhase 3 — Themespriority:P1Important — should land in phaseImportant — should land in phaseskill:goGo programmingGo programmingtype:featNew feature or implementation taskNew feature or implementation task
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Implement the
invalidation-workerAsynq worker per doc 07 §16.2 that tails thecache_invalidationsoutbox table. For each row it (1) callsFragmentCache.InvalidateTags, (2) POSTs to the Next.js/api/revalidatewebhook, (3) purges Cloudflare cache-tags via API, then (4) deletes the row. Failures are retried with exponential backoff. Crash-safe: if the worker dies mid-run, the row remains and the next invocation picks it up.Design reference
Acceptance criteria
cache_invalidationsrows in orderpost:{uuid},term:{uuid},user:{uuid},type:{slug},archive:...,media:{uuid},nav:{uuid},site:settings,global)Dependencies
#fragment-cache, #isr-webhook
Complexity
M