Wordpress/Nginx partial page caching for logged in users?
I have a WordPress site (2 load balanced with a separate shared db server actually), and I have a growing number of users that login to get access to certain content areas of the site. Since the content (although not the access) is static, I would like to cache these pages for logged in users but I have the following problem:
Each of these pages contain links to internal resources that are controlled depending on the membership rights the user has. So for example, on a page of links some of the links will go to the content (if one has rights) and some will go to a "please subscribe for access" page.
I am researching the best way to cache these pages, here are some ideas:
Set cookies based on rights, and cache the output of each page result that matches every combo of cookies
Any other suggestions? Is there some better system out there for caching only parts of a page or fragment? Or something that caches every possibility but only serves the appropriate cached version based on user rights?
Thanks in advance for any suggestions or pointers!