Today, 12:47 AM
(This post was last modified: Today, 12:56 AM by hmfaysal. Edited 3 times in total.)
I am having the same problem, for the time being solved it with aggressive nginx proxy caching
I am well aware this is not a permanent solution. But this has to do for now till we get a better solution. Open to any suggestion
Code:
# Images / Thumbnails
location ~ ^/Items/.*/Images/ {
proxy_pass http://127.0.0.1:8096;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# --- disk cache ---
proxy_cache jfimg;
proxy_cache_valid 200 1y; # honour upstream max-age if present
proxy_cache_revalidate on;
proxy_cache_lock on; # avoid stampedes
proxy_cache_key "$scheme$proxy_host$request_uri";
add_header X-Cache-Status $upstream_cache_status always;
# --- browser cache ---
expires 1y;
add_header Cache-Control "public, immutable";
# Small buffers are fine for images; leave buffering on for speed
proxy_buffering on;
proxy_buffer_size 64k;
proxy_buffers 8 64k;
proxy_busy_buffers_size 256k;
}
I am well aware this is not a permanent solution. But this has to do for now till we get a better solution. Open to any suggestion