mirror of
https://github.com/mempool/mempool.git
synced 2025-01-19 05:34:03 +01:00
Enable nginx warm cache for mining pools API data
This commit is contained in:
parent
6a8874a9e0
commit
55652130a8
@ -1,16 +1,26 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
hostname=$(hostname)
|
hostname=$(hostname)
|
||||||
while true
|
while true
|
||||||
do for url in /api/v1/statistics/2h \
|
do for url in / \
|
||||||
/api/v1/statistics/24h \
|
'/api/v1/statistics/2h' \
|
||||||
/api/v1/statistics/1w \
|
'/api/v1/statistics/24h' \
|
||||||
/api/v1/statistics/1m \
|
'/api/v1/statistics/1w' \
|
||||||
/api/v1/statistics/3m \
|
'/api/v1/statistics/1m' \
|
||||||
/api/v1/statistics/6m \
|
'/api/v1/statistics/3m' \
|
||||||
/api/v1/statistics/1y \
|
'/api/v1/statistics/6m' \
|
||||||
/api/v1/statistics/2y \
|
'/api/v1/statistics/1y' \
|
||||||
/api/v1/statistics/3y \
|
'/api/v1/statistics/2y' \
|
||||||
/
|
'/api/v1/statistics/3y' \
|
||||||
|
'/api/v1/mining/pools?interval=24h' \
|
||||||
|
'/api/v1/mining/pools?interval=3d' \
|
||||||
|
'/api/v1/mining/pools?interval=1w' \
|
||||||
|
'/api/v1/mining/pools?interval=1m' \
|
||||||
|
'/api/v1/mining/pools?interval=3m' \
|
||||||
|
'/api/v1/mining/pools?interval=6m' \
|
||||||
|
'/api/v1/mining/pools?interval=1y' \
|
||||||
|
'/api/v1/mining/pools?interval=2y' \
|
||||||
|
'/api/v1/mining/pools?interval=3y' \
|
||||||
|
|
||||||
do
|
do
|
||||||
curl -s "https://${hostname}${url}" >/dev/null
|
curl -s "https://${hostname}${url}" >/dev/null
|
||||||
done
|
done
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
location /api/v1/statistics {
|
location /api/v1/statistics {
|
||||||
try_files /dev/null @mempool-api-v1-warmcache;
|
try_files /dev/null @mempool-api-v1-warmcache;
|
||||||
}
|
}
|
||||||
|
location /api/v1/mining/pools {
|
||||||
|
try_files /dev/null @mempool-api-v1-warmcache;
|
||||||
|
}
|
||||||
location /api/v1 {
|
location /api/v1 {
|
||||||
try_files /dev/null @mempool-api-v1-coldcache;
|
try_files /dev/null @mempool-api-v1-coldcache;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user