PluginProbe
404 Solution / trunk
404 Solution vtrunk
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / view-build / ViewReadRuntimeState.php

ViewReadRuntimeState.php in 404 Solution trunk, at includes/view-build/ViewReadRuntimeState.php

42 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 exit;
5 }
6
7 /**
8 * Runtime-only flags and cache constants for the admin view-read path.
9 */
10 final class ABJ_404_Solution_ViewReadRuntimeState {
11
12 const CACHE_KEY_REDIRECT_STATUS = 'abj404_redirect_status_counts';
13 const CACHE_KEY_CAPTURED_STATUS = 'abj404_captured_status_counts';
14 const CACHE_KEY_REDIRECT_STATUS_LAST_KNOWN = 'abj404_redirect_status_counts_last_known';
15 const CACHE_KEY_CAPTURED_STATUS_LAST_KNOWN = 'abj404_captured_status_counts_last_known';
16 const CACHE_KEY_HIGH_IMPACT_CAPTURED = 'abj404_high_impact_captured';
17 const CACHE_KEY_HIGH_IMPACT_CAPTURED_LAST_KNOWN = 'abj404_high_impact_captured_last_known';
18 const STATUS_CACHE_TTL = 86400;
19 const STATUS_LAST_KNOWN_CACHE_TTL = 2592000;
20 const VIEW_SNAPSHOT_CACHE_TTL_SECONDS = 120;
21 const VIEW_SNAPSHOT_REFRESH_COOLDOWN_SECONDS = 30;
22 const VIEW_SNAPSHOT_WARMUP_STAGE_TIMEOUT_SECONDS = 28;
23 const VIEW_SNAPSHOT_WARMUP_STALE_SECONDS = 35;
24 const VIEW_SNAPSHOT_WARMUP_MAX_ATTEMPTS = 3;
25 const VIEW_SNAPSHOT_MAX_PAYLOAD_BYTES = 2097152;
26 const LOGS_COUNT_CACHE_TTL_SECONDS = 60;
27
28 /**
29 * Debounce window for the high-frequency captured-insert path. A busy 404
30 * site captures continuously; invalidating the captured status-count cache
31 * on every insert keeps the SUM(CASE) aggregate permanently cold (report.md
32 * Finding 4). A captured insert clears the captured cache at most once per
33 * this window; the count is therefore at most this many seconds stale.
34 * Matched to the view-snapshot refresh cooldown / client detect-poll cadence.
35 */
36 const CACHE_KEY_CAPTURED_COUNT_INVALIDATE_COOLDOWN = 'abj404_captured_count_invalidate_cooldown';
37 const CAPTURED_COUNT_INVALIDATE_COOLDOWN_SECONDS = 30;
38
39 /** @var bool Per-request bulk mutation deferral flag. */
40 public static $bulkMutationInProgress = false;
41 }
42