Docs: Taxonomy cache refresh logic — middle-tier anchor, client re-pull, and triggers #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Docs: Taxonomy cache refresh logic — middle-tier anchor, client re-pull, and triggers
Summary
WooCommerce's REST API exposes no last-modified timestamp on categories, attributes, or tags — only products carry
date_modified. The middle tier (FastAPI) must therefore manufacture its own freshness anchor, since the client never talks to Woo directly and reads taxonomy exclusively from the middle tier's SQLite cache.This issue captures the agreed refresh model so the docs state it explicitly rather than leaving it implied.
Current plan of record (gap)
CONTENT-WOO defines
POST /api/admin/taxonomy/sync, which pulls categories, attributes, and tags, rebuilds the cache tables in a single transaction, and on failure returns 502 while keeping the previous cache. The only documented freshness rule is opportunistic: before product create, re-sync "if cache older than one hour." There is no stated anchor, no client-visible freshness signal, and no defined set of refresh triggers.Agreed model
Anchor
menu_order) automatically brings that field's changes into scope without touching the refresh logic. Reorder is currently a no-op only because the schema does not store it — not because reorder is semantically excluded.Client behavior
Triggers
Avoid syncing on every screen navigation — that hammers the Woo API for no benefit.
Required doc changes
Acceptance criteria
last_modifiedexists for categories, attributes, or tags.Labels / priority
Non-blocking for POC (the one-hour opportunistic rule already works), but required before the taxonomy flow is considered complete. Linked to
docs/refactor-v2.