Title: Custom sidebars sending Cache-Control header
Last modified: August 22, 2016

---

# Custom sidebars sending Cache-Control header

 *  Resolved [Tim](https://wordpress.org/support/users/tkaufmann/)
 * (@tkaufmann)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/)
 * Hi,
 * as soon as I enable custom sidebars on my blog, nginx stops caching my pages.
   I found out that the Cache-Control HTTP header is being set to “no-store, no-
   cache, must-revalidate, post-check=0, pre-check=0”. Cache-Control disappears 
   after deactivating the custom sidebars plugin.
 * Please advise,
 * Tim
 * [https://wordpress.org/plugins/custom-sidebars/](https://wordpress.org/plugins/custom-sidebars/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [Tim](https://wordpress.org/support/users/tkaufmann/)
 * (@tkaufmann)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/#post-5443547)
 * Further investigation lead to the following, temporary solution:
 * in custom-sidebars/inc/class-custom-sidebars-explain.php comment out line 55 (
   session_start()).
 * In custom-sidebars/inc/external/wpmu-lib/functions-wpmulib.php comment out line
   69 (session_start())
 * Which leads to another questions: Are those sessions a requirement or just a 
   feature of the library?
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/#post-5443572)
 * Hi Tim,
 * I hope you are well today.
 * The sessions are used to store the explain state and some other information.
 * If the plugin is working fine for you after deactivating the above code then 
   it’s ok but if you are facing any issue with it then please share me your site
   link so that i can test the Cache-Control HTTP header on your site as i am not
   getting this on my test site.
 * Kind Regards,
    WPMU DEV
 *  Thread Starter [Tim](https://wordpress.org/support/users/tkaufmann/)
 * (@tkaufmann)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/#post-5443573)
 * We’re hosting on nginx. Could it be that wordpress’ nginx mode is triggering 
   that behaviour? In my opinion, a sidebar plugin should not trigger cache headers
   in the frontend 😉
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/#post-5443574)
 * Hi Tim,
 * Thank you for your reply.
 * I don’t think this is nginx related issue, i discussed it with the plugin developer
   and he said the session is needed on the Admin Dashboard only, not on the page
   itself, so we are going to add a condition as following to only use it there.
 *     ```
       if ( ! session_id() && is_admin() ) {
       	session_start();
       }
       ```
   
 * The developer also said that it might be related to the PHP default setting for
   session-caching
 * [http://php.net/manual/en/function.session-cache-limiter.php](http://php.net/manual/en/function.session-cache-limiter.php)
 * If session is enabled the default PHP session_cache_limiter is “nocache”
 * The user might solve the issue by inserting this line directly before session_start
 *     ```
       session_cache_limiter('public');
       ```
   
 * Could you please try using the above solutions provided by the plugin developer?
 * Regards,
    WPMU DEV
 *  Thread Starter [Tim](https://wordpress.org/support/users/tkaufmann/)
 * (@tkaufmann)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/#post-5443582)
 * Sorry, took me a while to get back to you. Both suggested solutions work.
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/#post-5443583)
 * Hi Tim,
 * Thank you for your reply and glad the suggested solutions worked for you.
 * If we can be of any further assistance please don’t hesitate to ask 🙂
 * Cheers,
    Vinod Dalvi

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Custom sidebars sending Cache-Control header’ is closed to new replies.

 * ![](https://ps.w.org/custom-sidebars/assets/icon-256x256.png?rev=1414065)
 * [Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager](https://wordpress.org/plugins/custom-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-sidebars/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/custom-sidebars-sending-cache-control-header/#post-5443583)
 * Status: resolved