Add file-based API cache — monitor and arrs pages now serve from /tmp/vv_cache instead of making live HTTP calls on every page load
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# ==============================================================================================
|
||||
# ================================= API Cache Writer ===========================================
|
||||
# ==============================================================================================
|
||||
#
|
||||
# PURPOSE
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Builds the monitor and arrs API payloads and writes them to /tmp/vv_cache/
|
||||
# so page loads can serve from the file instantly instead of making live HTTP
|
||||
# calls on every request.
|
||||
#
|
||||
# Runs every minute via the Varaverk scheduler. /tmp is tmpfs — files are
|
||||
# RAM-speed reads and auto-cleared on reboot.
|
||||
#
|
||||
# ==============================================================================================
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
php "$SCRIPT_DIR/api_cache_writer.php"
|
||||
Reference in New Issue
Block a user