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.

53 lines
1.2 KiB

  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. ~*woocommerce_items_in_cart 1;
  13. ~*woocommerce_cart_hash 1;
  14. ~*wptouch_switch_toogle 1;
  15. ~*comment_author_email_ 1;
  16. }
  17. map $request_uri $uri_cache {
  18. default 0;
  19. ~*\/wp-admin\/.* 1;
  20. ~*\/wp-[a-zA-Z0-9-]+\.php 1;
  21. ~*\/feed\/.* 1;
  22. ~*\/index.php 1;
  23. ~*\.*sitemap.*\.xml* 1;
  24. ~*\/wp-comments-popup\.php 1;
  25. ~*\/wp-links-opml\.php 1;
  26. ~*\/wp-locations\.php 1;
  27. ~*\/wp-\.*\.php 1;
  28. }
  29. map $request_method $request_cache {
  30. default 0;
  31. POST 1; #no caching on post
  32. }
  33. map $query_string $query_cache {
  34. default 1;
  35. "" 0;
  36. }
  37. map $http_request_cache$cookie_cache$uri_cache$request_cache$query_cache $skip_cache {
  38. default 1;
  39. 00000 0;
  40. }