Enabling L2 Cache for winforms/wpf beneficial?

3 posts, 1 answers
  1. Raoul
    Raoul avatar
    33 posts
    Member since:
    Apr 2012

    Posted 06 Aug 2013 Link to this post

    Given these 3 scenarios, would enabling L2 cache improve data retrieval? 

    1) Single-instance winform (or WPF) app. Only one instance on a workstation is running.
    2) Multiple-instance winform (or WPF) app. Multiple instances of the application can run simultaneously, but all instances connect to the same back-end database.
    3) Multiple instance winform (or WPF) app. Multiple instances of the application can run simultaneously, but all instances connect to a different back-end database.

    Kind regards,
    Raoul
  2. Answer
    Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 07 Aug 2013 Link to this post

    Hi Raoul,

    The short answer to all of your questions is "yes".
    Level 2 cache enables multiple OpenAccessContext instances to share some cached data.
    They have to be in the same Application Domain (in your case application instance) so no cached data will be shared between multiple instances of the same application regardless of the database/server that they are targeting. One exception is web farm with MSMQ acting as synchronization bridge between farm nodes.

    In order to have use Level 2 Caching property you need multiple OpenAccess context instances to be used in you application. Usually this is the case. The context instances do not have to be live simultaneously. You will experience performance boost especially when having lots of static data that one context can cache and all requests for the same data will be served from the cache from that point.

    When considering whether or not to enable Level 2 caching you should consider the other side - your application will consume more memory.

    If you need any further assistance do not hesitate to contact us again.

    Regards,
    Viktor Zhivkov
    Telerik
    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
  3. DevCraft banner
  4. Raoul
    Raoul avatar
    33 posts
    Member since:
    Apr 2012

    Posted 08 Aug 2013 Link to this post

    Thank you for clarifying Victor. 
Back to Top