PersonalizedData.Load cached?

Vote:
 

Hi all,

Is calls to the PersonalizedData.Load(Sid user) cached by EPiServer?  We are planning on storing some metadata on users there, and it's important that it's "cheap" in terms of system resources to retrieve this information for any user (not only the currently logged in one).

Thanks,
Christoffer

#20235
May 23, 2008 9:44
Vote:
 

Hi Christoffer!

No, PersonalizedData.Load() is not cached and will hit the database everytime its called.

EPiServer (4.x) do however cache UnifiedPrincipal's which in turn contains the PersonalizedData through the UserData property, and I suppose that you could try to retrieve the cached data through a call to UnifiedPrincipal.LoadFromCache(IIdentity).

If this calls fails, you could initialize the UnifiedPrincipal through the suitable constructor and then call AddToCache().

Regards,
Johan Olofsson

#20381
May 27, 2008 21:38
Vote:
 
Great! Thanks for the suggestion!
#20495
Jun 02, 2008 22:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.