21 questions
0
votes
0
answers
183
views
NGINX cache always returning MISS in browser although its caching
I am trying to learn caching using nginx to cache my NEXT APIs. This is my
nginx.config
worker_processes 1;
events {
worker_connections 1024;
}
http {
proxy_cache_path /tmp/nginx/cache ...
0
votes
1
answer
309
views
The POST request body as part of the cache key in NGINX caching is not working as expected
I am attempting to use NGINX as a reverse proxy in front of a GraphQL server and leverage NGINX caching. In my configuration, I intend to cache the response of POST API requests, considering both the ...
1
vote
2
answers
161
views
Nginx cache entry after header update
Nginx cache with proxy_cache_background_update on;
some api response that has Cache-Control=max-age=7, public, stale-while-revalidate=59. After a while upstream response changes header for the same ...
1
vote
0
answers
151
views
nginx cors error for prefligth request for chrome [backend tomcat server]
hello i am using ngnix as a static server
I am getting a error in chrome only [ Ensure preflight responses are valid ]
i tried
proxy_hide_header "Access-Control-Allow-Origin"
add_header '...
1
vote
0
answers
693
views
Purge and recreate cache of a specific URL in Nginx proxy cache
I have some websites using Nginx fcgi_cache to serve guests faster. but some day I update a menu in header or update a page.
Note: I have tried proxy_cache_purge directive and It's part of nginx ...
0
votes
1
answer
398
views
Nginx cache not working for certain URL's
I have some wordpress websites running. Nginx fcgi_cache is working for all of these websites but one!
This particular one is no different than others. But some of this site's URLs are not caching!
...
0
votes
0
answers
399
views
Cache control in Nginx+Django
I have a server on Nginx. It is written with Django and connected to Nginx through Waitress. I have set up a cache in Nginx. My server has both dynamic and static pages.
After starting a server, it ...
1
vote
1
answer
868
views
What does Nginx take into account when caching a request?
What attributes(headers, cookies) besides url does Nginx take into account when caching a request?
I was trying to find out this information in nginx/log/access.log file. I have found only information ...
0
votes
1
answer
21
views
Can nginx cache proxied responses unconditionally?
I'm trying to unconditionally cache an upstream server that provides neither an Expires nor a Cache-Control header. I'm not managing...
Config:
proxy_cache_path /tmp/nginx keys_zone=motus_cache:2m ...
0
votes
0
answers
3k
views
Nginx https reverse proxy is too slow
I have Implemented the Nginx cache with https reverse proxy in centos, My response time taking more than 1.5 seconds for each request. My nginx server configuration was 4 core, 8gb ram.
My ...
0
votes
1
answer
1k
views
Clear NGINX cache when origin changes response code
I have a specific need where I am caching 404 responses and not 200 for a request.
So, when a request is sent, say for example.com/page_A and if the page is not yet setup in origin, then this 404 is ...
3
votes
0
answers
331
views
Kubernetes - Nginx cached content is getting deleted when stored in AWS EFS volume
I am using the official Nginx image with modified config to cache origin responses. The configuration below is includeed in the http block inside the /etc/nginx/nginx.conf (The main config file for ...
0
votes
1
answer
2k
views
Nginx FastCGI Cache Key Not working when using original URL
I have question about Nginx Cache
This my Nginx Config
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=fpmcache:100m max_size=70g inactive=3d use_temp_path=off;
server {
listen 80;
...
1
vote
0
answers
81
views
Nginx server cannot cache the contents of a webpage
I am new to nginx and I am trying to cache my website.
I have a website A that redirects the user to the website B if there is no cache stored.
Ideally, the website A should show the "old" ...
1
vote
0
answers
2k
views
NGINX - Setting a variable with regex replace
I'm looking to improve nginx caching by removing irrelevant query parameters (that could come from web crawlers or similar) from the request. I have come across an unwieldy solution on the internet:
...
1
vote
0
answers
186
views
Nginx proxy_cache_lock in multiple locations
http {
...
server {
...
location /good {
proxy_cache mycache;
proxy_cache_key $arg_cachekey;
proxy_cache_valid 200 1h;
...
1
vote
1
answer
856
views
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 ...
1
vote
1
answer
784
views
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 ...
0
votes
0
answers
691
views
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=...
5
votes
2
answers
3k
views
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 ...
326
votes
26
answers
554k
views
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 ...