The website I'm building has a heavily extended user model. The requirement is to have a single page where admins (who are windows authenticated users) can see the profiles of all the users. Regular users (who are FBA authenticated) must also be able to view/edit their own profile from the "My Sites" profile.

The solution I've come up with involves using the User Profile service, and programatically retrieving the profiles to present to the admins. The profiles can then be edited with code similar to the following:

SPSite site = new SPSite(SPContext.Current.Site.ID);
SPServiceContext serviceCtx = SPServiceContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(serviceCtx);
UserProfile profile = profileManager.GetUserProfile(userId);
//Update the profile
profile["someProperty"].Value = "new value";

However, it takes about 20 seconds for the change to be seen in the admin's view. Repeating the call and inspecting the profile shows the old values. The value is immediately persisted to the DB and a user viewing their profile sees the change instantly.

It seems the data is being cached and I suspect this is the role of the User Profile Service Application Proxy but this behaviour seems wrong?

Is there a better way, or at least a way to bypass/invalidate the cache? Your help is MUCH appreciated.

  • 2
    I've seen this two and looked at the calls through reflection. Their is definitely intentional cacheing and I don't see a way around it. The cache appears to clear when a timer job is run every minute.
    – Tom Resing
    Commented Aug 30, 2011 at 20:43

3 Answers 3


When you say "...repeating the call and inspecting the profile..." do you mean that you are inspecting the profile programmatically after the update, or from the admin's view on the web browser. I wonder if the web browser is caching the administrator's view.

  • Inspecting the profile programmatically through the debugger, so it's not the browser cache.
    – Anonymous
    Commented Aug 20, 2010 at 17:26

We had a problem with the user profile caching too. We tried setting up a timer job to hit the service at 4.00 am so that it finishes caching by 9.00 am. For some reason it did not work always. We ended up copying the content to a DB and displaying in the site and refreshing the DB early every morning.


I believe Admin view is by browser, Verify changes are reflected in /_catalogs/users/detail.aspx, if its not updated then try updating "User Information List" directly e.g. web.Lists["User Information List"]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.