The object cache loads every document and page twice so that the published version and the latest version (not published) is readily available for the next time the same object needs loading.

Users and is Object Cache?

Two user accounts are used for this. A super reader account and a super user account.

Setting  permissions for  the user accounts in Central Administration

  1. Login with a user account that is a member of the Farm Administrators group on the machine that is running the SharePoint Central Administration website.
  2. In Central Administration website -> Application Management -> Manage web applications -> Application
  3. On the Web Applications tab -> Policy group -> User Policy.
  4. click Add Users.
  5. select All zones, and then click Next.
  6. In the Users box type the superuser user account
  7. In the Choose Permissions section, check the Full Control
  8. Click Finish.
  9. Repeat Steps 4 through 8 for the super reader account.
  10. In the Choose Permissions section, check the Full Read.
  11. Click Finish.
  12. Note that the names as they appear in the Username column can be different when you use claims authentication for the web application. You will need the exact name later.

To get the current settings

$wa = Get-SPWebApplication -Identity "<WebApplication>"
$wa.Properties

This will return some properties. The important ones are:

  • portalsuperuseraccount
  • portalsuperreaderaccount

My customer this week had both accounts set the the farm account (full control) and this has been causing problems without anybody noticing.

As the farm account was used for both the read and full control only the not published version of a page would be cached.

Updating the Object Cache users

We are nearly there. The following commands will update the user accounts.

$wa = Get-SPWebApplication -Identity "<WebApplication>"
$wa.Properties["portalsuperuseraccount"] = "<SuperUser>"
$wa.Properties["portalsuperreaderaccount"] = "<SuperReader>"
$wa.Update()

Make sure that both properties are set to the username as found in central admin ( See note in step 12)

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading