Commit ec668d35 authored by Cédric F.'s avatar Cédric F.

Remove cache for now

parent 8e7b3702
Pipeline #14998781 (#) passed with stage
in 1 minute and 22 seconds
......@@ -17,13 +17,10 @@ clean:
nginx:
sudo -u http -- nginx -c nginx/nginx.conf -p . -g 'daemon off;'
cache_buster:
sudo ./cache_buster.sh
dcrd:
dcrd --rpcuser bitcoin --rpcpass secret
bitcoind:
bitcoind -par=-1 -server -txindex -rpcuser=bitcoin -rpcpassword=secret
.PHONY: watch clean nginx cache_buster dcrd
.PHONY: watch clean nginx dcrd
......@@ -65,7 +65,6 @@ Run:
```
make dcrd
make nginx
make cache_buster
```
## License
......
#!/bin/bash -eu
test $UID -eq 0
# XXX: update paths according to your setup
LOG="/home/infertux/.dcrd/logs/mainnet/dcrd.log"
CACHE="$(dirname $0)/nginx/cache/rpc"
find "$CACHE" -mindepth 1 -delete -print
tail -F -n 0 "$LOG" | \
while read -r line; do
if echo "$line" | grep -E 'BMGR: Processed [0-9]+ blocks? in the last'; then
find "$CACHE" -mindepth 1 -delete -print
fi
done
......@@ -13,8 +13,6 @@ http {
include /etc/nginx/mime.types;
proxy_cache_path nginx/cache/rpc levels=1 keys_zone=rpc:100m max_size=10g inactive=1y use_temp_path=off;
limit_req_zone $binary_remote_addr zone=default:10m rate=5r/s;
map $http_upgrade $connection_upgrade {
......@@ -66,16 +64,6 @@ http {
proxy_set_header Authorization "Basic Yml0Y29pbjpzZWNyZXQ="; # bitcoin:secret
proxy_set_header Host $host;
proxy_cache rpc;
proxy_cache_key $proxy_host#$request_body;
proxy_cache_methods GET HEAD POST;
proxy_cache_valid any 1y; # purged by external process
proxy_cache_use_stale error timeout;
# proxy_cache_bypass $http_pragma; # set Pragma:no-cache to bypass cache
add_header X-Cache-Status $upstream_cache_status;
proxy_pass https://localhost:9109/; # dcrd
# proxy_pass http://localhost:8332/; # bitcoind
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment