Friday, June 12, 2015

Configuring object cache user accounts in SharePoint 2013


Object cache in SharePoint Server 2013 stores properties about items. It uses two accounts from active directory to make its queries. These accounts are termed as “Super User” and “Super Reader”. These account needs full control and Full read access respectively to SharePoint portal and there should be no password change for the accounts.

The Object cache queries based on the user request based on the draft items which a user can see. When a publishing feature makes a request to cache object to get data from a control, it makes query based on two users; once with the Super User and once with Super Reader and stores the result for both queries. The super reader results includes all published content while the super reader also includes draft items.

When the object cache has both the results, it checks the access level of user in ACL and returns the appropriate result. By adding the results for both user i.e. Super User and Super Reader, it reduces the use of memory to store the cache and increases the number of results stored.

 

From Central Administration 

1.       Open the “Central Administration”, go to “Application Management” section and click “Manage web applications”.

2.       Click the name of the web application for which the configuration in required.
 
 

3.       On the top ribbon tab, in the “Policy group”, click “User Policy”.

4.       In the Policy for Web Application window, click Add Users.
 
 

5.       On the add users screen, select All zones from “Zones” dropdown and then click Next.

6.       On the next screen add users in the Users people picker control either Super User or Super Reader account

7.       In the “Choose Permissions” section, check the “Full Control - Has full control” or “Full Read – Has Full Read-only access” for Super User or Super reader respectively.
 

 

8.       Click Finish to complete.

 

From Windows PowerShell

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

Be careful in adding the Super User and Super Reader accounts through PowerShell. You can make a judgment on whether to the prefix of “i:0#.w|” in start of account based on the account shown while you add users in central admin.
             

Restart IIS of individual site for changes to take effect.

No comments:

Post a Comment