Title: Private posts
Last modified: September 3, 2019

---

# Private posts

 *  [giuseppebonanno](https://wordpress.org/support/users/giuseppebonanno/)
 * (@giuseppebonanno)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/private-posts-20/)
 * Hi, I see your plugin caches password protected posts except when password is
   not required ([https://plugins.trac.wordpress.org/browser/cache-control/trunk/cache-control.php#L290](https://plugins.trac.wordpress.org/browser/cache-control/trunk/cache-control.php#L290)).
   This cause password form to be cached and you can’t see protected content until
   cache expires.
    I think you can remove the line linked before to solve the issue.
 * My workaround:
    add_filter(‘cache_control_nocacheables’,function ($noncacheable){
   global $post; if(!empty($post->post_password) ) return true; return $noncacheable;});

The topic ‘Private posts’ is closed to new replies.

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

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [password](https://wordpress.org/support/topic-tag/password/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [private](https://wordpress.org/support/topic-tag/private/)

 * 0 replies
 * 1 participant
 * Last reply from: [giuseppebonanno](https://wordpress.org/support/users/giuseppebonanno/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/private-posts-20/)
 * Status: not resolved