Enabling the 2nd level distributed cache

2 posts, 1 answers
  1. Skywalker
    Skywalker avatar
    67 posts
    Member since:
    Sep 2007

    Posted 12 Sep 2010 Link to this post


    Does anyone know how to enable the distributed cache using the OA Designer?
    With OA Classic, one could configure this using the openaccess backendconfigurations xml node.
    With OA Designer, I can turn on the 2nd level cache using the Model Settings dialog window, but I can't seem to find anything related to enabling MSMQ.

    Also, the documention states that I should modify the registry values HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\MulticastRateKbitsPerSec and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\MessageCleanupInterval, but these keys don't exist on my machine (I'm running Windows 7 Ultimate, x64). Should I add these values? (I attached a screenshot of my registry to show what keys I do have).

    Hope someone can help!

  2. Answer
    Alexander avatar
    727 posts

    Posted 14 Sep 2010 Link to this post

    Hello Skywalker,

    You are right, the distributed L2 cache cannot be enabled from the Model Settings dialog yet. You can however specify that in the backend configuration which the context uses. You can modify the static GetBackendConfiguration method of the context class to set the proper options but this code would be regenerated (and your changes would be lost) when the diagram is saved. So I would suggest you to instantiate the context the following way:
    BackendConfiguration config = NorthwindEntityDiagrams.GetBackendConfiguration();
    config.SecondLevelCache.Synchronization.Enabled = true;
    config.SecondLevelCache.Synchronization.MulticastAddress = "";
    using (NorthwindEntityDiagrams context = new NorthwindEntityDiagrams(config))

    Those two properties - Enabled and MulticastAddress, correspond to the xml nodes that had to be specified in the app.config previously.
    As to the registry values, you can just add them if they are missing and you do not want to use the default values. Hope that helps.

    Best wishes,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top