You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
956 B

  1. map $http_x_requested_with $http_request_cache {
  2. default 0;
  3. XMLHttpRequest 1;
  4. }
  5. map $http_cookie $cookie_cache {
  6. default 0;
  7. ~*wordpress_[a-f0-9]+ 1;
  8. wp-postpass 1;
  9. wordpress_logged_in 1;
  10. wordpress_no_cache 1;
  11. comment_author 1;
  12. }
  13. map $request_uri $uri_cache {
  14. default 0;
  15. ~*\/wp-admin\/.* 1;
  16. ~*\/wp-[a-zA-Z0-9-]+\.php 1;
  17. ~*\/feed\/.* 1;
  18. ~*\/index.php.* 1;
  19. ~*\.*sitemap.*\.xml* 1;
  20. ~*\/xmlrpc.php 1;
  21. }
  22. map $request_method $request_cache {
  23. default 0;
  24. POST 1; #no caching on post
  25. }
  26. map $query_string $query_cache {
  27. default 1;
  28. "" 0;
  29. }
  30. map $http_request_cache$cookie_cache$uri_cache$request_cache$query_cache $skip_cache {
  31. default 1;
  32. 00000 0;
  33. }