Nginx static cache configuration selection

choose that configuration for static files:

 location ~ .*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$ {
   
    expires 6h; -sharp
 
    }

and this configuration

 location ~ .*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$
    {
    proxy_pass http://app;
    expires 6h; 
    proxy_cache tem;

    proxy_cache_valid 200 1h;-sharp2001
    proxy_cache_valid 301 1d;-sharp301
    proxy_cache_valid any 1m;-sharp
    }

which configuration should I use? For dynamic requests, is it necessary to use the proxy_cache module to maintain direct access to the cache for a period of time?

Jul.09,2021

you give a static configuration and a proxy cache configuration and ask which configuration should be used. Isn't this supposed to ask you, so how is your site configured? Is it a static station or an agent to the back end?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35e59-4100f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35e59-4100f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?