What is Object Cache?

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.

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 setttings

$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)

Advertisements