Title: Not caching POST request.
Last modified: July 20, 2017

---

# Not caching POST request.

 *  [figacz](https://wordpress.org/support/users/figacz/)
 * (@figacz)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/not-caching-post-request/)
 * I have WP with nginx and this configuration.
 *     ```
       set $cache_uri $request_uri;
   
       # POST requests and urls with a query string should always go to PHP
       if ($request_method = POST) {
           set $cache_uri 'null cache';
       }
       if ($query_string != "") {
           set $cache_uri 'null cache';
       }
   
       # Don't cache uris containing the following segments
       if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php
                             |wp-.*.php|/feed/|index.php|wp-comments-popup.php
                             |wp-links-opml.php|wp-locations.php |sitemap(_index)?.xml
                             |[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
   
           set $cache_uri 'null cache';
       }
   
       # Don't use the cache for logged-in users or recent commenters
       if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+
                            |wp-postpass|wordpress_logged_in") {
           set $cache_uri 'null cache';
       }
   
       # Set the cache file
       set $cachefile "/wp-content/cache/supercache/$http_host/$cache_uri/index.html";
       if ($https ~* "on") {
           set $cachefile "/wp-content/cache/supercache/$http_host/$cache_uri/index-https.html";
       }
   
       # Add cache file debug info as header
       #add_header X-Cache-File $cachefile;
   
       # Try in the following order: (1) cachefile, (2) normal url, (3) php
       location / {
           try_files $cachefile $uri $uri/ /index.php?$args;
       }
       ```
   
 * All pages end with this:
 *     ```
       11:19:40 126068 / wp_cache_get_cookies_values: return: 
   
       11:19:40 126068 / supercache dir: /var/www/clients/client1/web11/web/wp-content/cache/supercache/www.tycico.cz/
   
       11:19:40 126068 / No Super Cache file found for current URL: /var/www/clients/client1/web11/web/wp-content/cache/supercache/www.tycico.cz/index-https.html
   
       11:19:40 126068 / wp_cache_get_cookies_values: return: 
   
       11:19:40 126068 / In WP Cache Phase 2
   
       11:19:40 126068 / Setting up WordPress actions
   
       11:19:40 126068 / Created output buffer
   
       11:19:41 126068 / Not caching POST request.
   
       11:19:41 126068 / wp_cache_maybe_dynamic: returned $buffer
       ```
   
 * No pages are cached. What could be wrong?
 * Thanks for reply.

The topic ‘Not caching POST request.’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [figacz](https://wordpress.org/support/users/figacz/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/not-caching-post-request/)
 * Status: not resolved