Skip to content

Consider skipping calendar full-response cache for sparse / noindexed term archives (51k-key cardinality on events site) #359

@chubes4

Description

@chubes4

Spun out of Extra-Chill/extrachill-events#168 (Redis cache-bloat audit).

Context

CalendarCache::generate_full_response_key() (inc/Blocks/Calendar/Cache/CalendarCache.php:104) keys the full calendar REST response on archive_taxonomy + archive_term_id (among other params), with a 1h upcoming / 24h past TTL. This is by design as the #246 DOS mitigation.

On the events site (blog 7), the archive_term_id axis = ~51k artist terms (plus venue/location), all walkable via core's wp-sitemap-taxonomies-artist-N.xml. Each archive view persists a data-machine_cal_full_* key, multiplied by paged / past / grid / format variants. This is the other per-archive key family (alongside the per-term stats transients fixed in ec-events#169) contributing to the 2.34M-key Redis bloat behind the 2026-06-02 login outage (ec-events#166, #167).

Question / proposed direction

For the long tail of sparse term archives (e.g. term->count < 2, which Extra Chill SEO already noindexes), the full-response cache buys little — those pages get one crawler hit and rarely a second within the TTL — but each still persists a key.

Options to weigh:

  1. Skip the full-response cache write for archives whose queried term is sparse (gate on term->count / a filterable threshold). Compute-on-request, don't persist.
  2. Shorten TTL specifically for sparse-archive buckets.
  3. A filter (data_machine_events_calendar_should_cache_full_response) so the host site (extrachill-events) can decide based on its own sparseness / noindex logic, keeping dme generic.

Option 3 keeps the policy in the platform layer (per RULES.md layer purity) — recommend that.

Acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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