JuliaPackaging / PkgServer.jl

MIT License
42 stars 14 forks source link

Notify PkgServer.jl about nginx cache hits #200

Closed fredrikekre closed 10 months ago

fredrikekre commented 10 months ago

As described in #198, the file cache is unaware of cache hits for files served directly by nginx. This patch notifies PkgServer.jl about nginx cache hits by sending a mirrored request to the internal /notify endpoint. The original request URI is sent through the X-Original-URI header and is used to record the cache hit. In addition, since any cache hits are for files already existing in the cache we can record the size as bytes sent by nginx in a Prometheus counter.