Questions tagged [nginx-cache]
8 questions
272
votes
24 answers
How to clear the cache of nginx?
I use nginx to as the front server, I have modified the CSS files, but nginx is still serving the old ones.
I have tried to restart nginx, to no success and I have Googled, but not found a valid way to clear it.
Some articles say we can just delete…
![](../../users/profiles/342235.webp)
Freewind
- 177,284
- 143
- 381
- 649
3
votes
1 answer
POST response caching does not work in nginx
My task is to implement microcaching strategy using nginx, that is, cache responses of some POST endpoints for a few seconds.
In http section of the nginx.conf I have the following:
proxy_cache_path /tmp/cache keys_zone=cache:10m levels=1:2…
![](../../users/profiles/7637120.webp)
Roman Puchkovskiy
- 9,798
- 4
- 25
- 51
1
vote
1 answer
Nginx cache inactive parameter not working
I want to serve static files stored on a different server. For that I use Nginx cache with the following configuration.
Nginx cache conf:
proxy_cache_path /var/cache/cdn levels=1:2 keys_zone=cdn:64m max_size=20g inactive=10m…
![](../../users/profiles/15634219.webp)
AlberichVR
- 11
- 1
1
vote
1 answer
Prestashop Nginx FastCgi Caching
I'm trying to enable Nginx FastCgi cache in Prestashop 1.7 but i cannot find any way detecting logged in users or users with active carts in order to bypass cache.
Prestashop seems to not implement a correct cache control mechanism for hearers (…
![](../../users/profiles/1887545.webp)
sarakinos
- 628
- 9
- 23
0
votes
0 answers
minify nginx(openresty) cached files
I need to minify cached files in nginx(openresty) for some reason and need to write some scripts that minify nginx cached files after files have been cached on the server ...
I write a script for that and this script was doing well, but after…
![](../../users/profiles/10121382.webp)
mohamadsajedi
- 1
- 1
0
votes
0 answers
nginx: Hot to cache files with ending "?ver=2.6.5” in browser
How can a I add files ending with for example:
.js?ver=5.3.2 or
.?ver=2.6.5
to my the chache policy.
I am using the following, which works fine with standard files, but does not cache files ending with other endings:
location ~*…
![](../../users/profiles/4027733.webp)
Bingo
- 21
- 3
0
votes
0 answers
NGINX Content Caching for Static Content
I am trying to have nginx cache static content. I'm mostly concerned with CSS and JS files, although this should work for any static content. I am NOT using nginx as a proxy, so basically what I am wanting is when someone hits my server: …
![](../../users/profiles/2196811.webp)
RJW
- 1
0
votes
0 answers
Nginx Caching for specific location with regular expression
I want to cache the content from specific location only. But when i am trying to use regular expression, it is not caching.
proxy_cache_path /AINginxService/nginx-1.16.1/cache/ levels=1:2 keys_zone=one:10m max_size=8g inactive=5d…
![](../../users/profiles/11546617.webp)
Shashank Dixit
- 19
- 6