PluginProbe
404 Solution / 4.3.0
404 Solution v4.3.0
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 4.3.0, at includes/view-build/ViewReadRuntimeState.php

39 lines 1.6 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_HIGH_IMPACT_CAPTURED = 'abj404_high_impact_captured';
15 const STATUS_CACHE_TTL = 86400;
16 const STATUS_CACHE_TIMEOUT_SELFHEAL_TTL = 300;
17 const VIEW_SNAPSHOT_CACHE_TTL_SECONDS = 120;
18 const VIEW_SNAPSHOT_REFRESH_COOLDOWN_SECONDS = 30;
19 const VIEW_SNAPSHOT_WARMUP_STAGE_TIMEOUT_SECONDS = 28;
20 const VIEW_SNAPSHOT_WARMUP_STALE_SECONDS = 35;
21 const VIEW_SNAPSHOT_WARMUP_MAX_ATTEMPTS = 3;
22 const VIEW_SNAPSHOT_MAX_PAYLOAD_BYTES = 2097152;
23 const LOGS_COUNT_CACHE_TTL_SECONDS = 60;
24
25 /**
26 * Debounce window for the high-frequency captured-insert path. A busy 404
27 * site captures continuously; invalidating the captured status-count cache
28 * on every insert keeps the SUM(CASE) aggregate permanently cold (report.md
29 * Finding 4). A captured insert clears the captured cache at most once per
30 * this window; the count is therefore at most this many seconds stale.
31 * Matched to the view-snapshot refresh cooldown / client detect-poll cadence.
32 */
33 const CACHE_KEY_CAPTURED_COUNT_INVALIDATE_COOLDOWN = 'abj404_captured_count_invalidate_cooldown';
34 const CAPTURED_COUNT_INVALIDATE_COOLDOWN_SECONDS = 30;
35
36 /** @var bool Per-request bulk mutation deferral flag. */
37 public static $bulkMutationInProgress = false;
38 }
39