Awesome q2a theme

How to configure caching for development in nginx?

0 like 0 dislike
39 views
I want so that when closed the console everything is cached, while the open, all loaded each time. This applies to the file cache with nginx and cache browser. Because even without the cache to be taking too long to load and cache is impossible to work with the same js.

1. How to specify nginx to update file cache if the file has changed?
2. Is it sufficient to tick the Disable Cache in the developer console on the browser side loaded the new version?
by | 39 views

1 Answer

0 like 0 dislike
1. With caching, the app will generate the page once and saves the result in memory for some time (called TTL). Until the TTL expires, the client will receive stored in memory version of the page.
If the user has any Cookies, caching can be disabled:
location / { if ($http_cookie ~* ".+" ) { set $do_not_cache 1; } }

2. Disable cache (while DevTools is open) should work.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 22, 2019 by Stilar
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users