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
- 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.
- In Central Administration website -> Application Management -> Manage web applications -> Application
- On the Web Applications tab -> Policy group -> User Policy.
- click Add Users.
- select All zones, and then click Next.
- In the Users box type the superuser user account
- In the Choose Permissions section, check the Full Control
- Click Finish.
- Repeat Steps 4 through 8 for the super reader account.
- In the Choose Permissions section, check the Full Read.
- Click Finish.
- 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:
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)