Enforces a row cap on cache_data, then clears anything expired.
Only the row cap works: all 144 cache_data rows on the reference site have expire = -1, so an
expire sweep removes none. 70 are RouteProvider's per-URL route cache (CACHE_PERMANENT), so
every distinct URL a scanner probes adds a permanent row.
The cap is Drupal's own (getMaxRows() is 5000, from DatabaseBackend::DEFAULT_MAX_ROWS),
enforced by garbageCollection(), which only SystemHooks::cron() calls and this runtime
cannot. It orders by created, cid rather than core's created <= pivot: created is a
millisecond float and one request writes several rows, so ties over-delete under core's form.
Enforces a row cap on cache_data, then clears anything expired.
Only the row cap works: all 144
cache_datarows on the reference site haveexpire = -1, so an expire sweep removes none. 70 areRouteProvider's per-URL route cache (CACHE_PERMANENT), so every distinct URL a scanner probes adds a permanent row.The cap is Drupal's own (
getMaxRows()is 5000, fromDatabaseBackend::DEFAULT_MAX_ROWS), enforced bygarbageCollection(), which onlySystemHooks::cron()calls and this runtime cannot. It orders bycreated, cidrather than core'screated <= pivot:createdis a millisecond float and one request writes several rows, so ties over-delete under core's form.