Weird issues with fastcgi_cache and images

Hey guys,
I got a strange issues when I activate fastcgi_cache some images doesn’t
load on first load of the page but when hitting refresh it loads.

Here’s my configuration :
location ~ .php$ {

FastCGI optimizing

            fastcgi_buffers 4 256k;
            fastcgi_buffer_size 128k;
            fastcgi_connect_timeout 3s;
            fastcgi_send_timeout 20s;
            fastcgi_read_timeout 20s;
            fastcgi_busy_buffers_size 256k;
            fastcgi_temp_file_write_size 256k;
            reset_timedout_connection on;
            # FASTCGI CACHE
            fastcgi_cache WORDPRESS;
            fastcgi_cache_key 

“$scheme$request_method$host$request_uri”;
fastcgi_cache_use_stale error timeout invalid_header
http_500;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_cache_valid any 1h;
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
fastcgi_cache_min_uses 2;
[…]
}

and I do have exclude conf for some cookies, wordpress administration
etc. Like this :
if ($request_method = POST) {
set $no_cache 1;
}

For testing purpose you can see here :
https://www.gamespirits.com/bande-dessinee/serie-bastien-vives-chez-shampooing/

Thanks in advance,

Have you tried this with curl -i to see if it’s not a browser cache
issue?

Sounds like a cached file with an expire date which is still valid
against
your expire date from cache.

Posted at Nginx Forum:

Have you tried this with curl -i to see if it’s not a browser cache issue?

Sounds like a cached file with an expire date which is still valid against
your expire date from cache.

I tried yesterday but I don’t really see the point… What should I look
for ?

I set a header to see if cache hit or miss, and when I don’t see the
images it misses and when I reload too.

Anyway, I set image cache time to match fastcgi cache time today but I
have the same problems.

Sorry I’m really a newbie in caching.

Some curl examples;

It all depends on what you get against what you expected.

Posted at Nginx Forum: