Partilhar via


How to Control the Profile Cache

I was Recently asked about, how do you control the Profile Cache? This post will answer this question.

Profile Cache

The ProfileService cache differs from other caches in Commerce Server because it does not use the ASP.NETcomponent nor is it configurable in the web.config. Instead, it includes its own built-in cache of profile objects. This cache cannot be disabled.

You control when the Profiling System refreshes and how often. You can configure the ProfileService cache using the following properties in the Profiling System connection string:

  • PsObjectCacheSize [optional]. Allows applications to specify the size of the Profiles resource object cache. This cache stores ProfileObject objects instantiated by the CreateProfile and GetProfile methods. The default value for this attribute is 16384. Setting this value to 0 (zero) does not turn off caching. Instead, this value then reverts to the default value of 1024.
  • PsSchemaCacheSize [optional]. Allows applications to specify the size of the Profile resource definition (schema) cache in entries. The acceptable range of values is from one (1) to 1024. The default is 1024. This is not a hard limit. A warning will be posted to the eventlog if the number of entries exceeds 1024.
  • PsBackgroundThread [optional]. Allows applications to control the creation of a background thread to periodically clean up entries from the Profiles resource object cache. The acceptable values for this parameter are zero (0) or one (1). Zero turns off the background thread, one turns it on. By default, the background thread is on.
  • PsObjectAgeoutPeriod [optional]. Allows applications to specify the age-out period for the Profiles resource cache entries. The age-out period is the amount of time an unreferenced object can remain in the cache without being discarded. The default value for this attribute is five minutes.
  • Connection_Retry [optional]. Allows the applications to specify the number of retry attempts if the connection to the Profile definition store is lost due to a communication failure. The default value for this attribute is 10.
  • Connection_Retry_Delay [optional]. Allows the applications to specify the delay in seconds between retry attempts if the connection to the Profile definition store is lost due to a communication failure. The default value for this attribute is 30.

For more details see the following help file:

ProfileService Object
IProfileService2::Initialize Method
Using Profiles in a Web Farm Scenario.

Comments

  • Anonymous
    August 10, 2007
    i want to find every one that looks at my profile

  • Anonymous
    August 12, 2007
    I am not sure what you mean? If you mean your Commerce Server Profile then only you can view your profile. Unless you have coded your site to allow such a viweing. -Max

  • Anonymous
    April 17, 2008
    I use CS2002 in my project. I call the RefreshApp.asp page to refresh my profiles. Once I request this page, I have trouble creating an user account.Account creation works only after I iisreset the server. Thanks Hema

  • Anonymous
    April 23, 2008
    The comment has been removed

  • Anonymous
    September 25, 2008
    Why wasn't this put into the product's documentation?

  • Anonymous
    September 25, 2008
    You got me? But if I was to take a guess then I would say the PM or developer missed it. For CS2007 they didn’t use the previous docs to update they started the doc fresh. a few items that were in CS2002 which still works in CS2007 have been missed and my guess that this is one of those instances. -Max