Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is the answer from the forum post:</p> <blockquote> <p>Hi. Sorry for the delayed response, but I want to say that these are great questions and will probably be useful to others.</p> <p>There shouldn't be a need for more than one DataCacheFactory per thread unless you are requiring different configurations. For example, if you programmatically configure the DataCacheFactory with the DataCacheFactoryConfiguration class, then you might want to create one that has local cache enabled and another that does not. In this case, you would use different DataCacheFactory objects depending on the configuration you require for your scenario. But other than differences in configuration, you should not see a performance gain by creating multiple DataCacheFactories.</p> <p>On the same subject, there is a MaxConnectionsToServer setting (either programmatic in DataCacheFactoryConfiguration or in the application configuration file as an attribute of the dataCacheClient element). This determines the number of chennels per DataCacheFactory that are opened to the cache cluster. If you have high throughput requirements and also available CPU/Network bandwidth, increasing this setting to 3 or higher can increase throughput. We don't recommend increasing this without cause or to a value that is too high for your needs. You should change the value and then test your scenario to observe the results. We hope to have more official guidance on this in the future.</p> <p>Once you have a DataCacheFactory, you do not need to call GetCache() multiple times to get multiple DataCache objects. Every call to GetCache() for the same cache on the same factory returns the same DataCache object. Also, once you have the DataCache object, you do not need to continue to call DataCacheFactory for it. Just store the DataCache object and continue to use it. However, do not let the DataCacheFactory object get disposed. The life of the DataCache object is tied to the DataCacheFactory object.</p> <p>You should never have to worry about contention with Get requests. However, with Put/Add requests, there can be contention if multiple data cache clients are updating the same key at the same time. In this case, you will get an exception with an error code of ERRCA0017, RetryLater and a substatus of ES0005, KeyLatched. However, you can easily add exception handling and retry logic to attempt the update again when errors such as these occur. This can be done for RetryLater codes with various substatus values. For more information, see <a href="http://msdn.microsoft.com/en-us/library/ff637738.aspx">http://msdn.microsoft.com/en-us/library/ff637738.aspx</a>. You can also use pessimistic locking by using the GetAndLock() and PutAndUnlock() APIs. If you use this method it is your responsibility to make sure that all cache clients use pessimistic locking. A Put() call will wipe out an object that was previously locked by GetAndLock().</p> <p>I hope this helps. Like I said, we hope to get this type of guidance into some formal content soon. But it is better to share it here on the forum until then. Thanks!</p> <p>Jason Roth</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload