This is a migrated thread and some comments may be shown as answers.

Enabling L2 Cache for winforms/wpf beneficial?

2 Answers 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Raoul
Top achievements
Rank 1
Raoul asked on 06 Aug 2013, 05:23 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Zhivkov
Telerik team
answered on 07 Aug 2013, 07:58 AM
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.
0
Raoul
Top achievements
Rank 1
answered on 08 Aug 2013, 10:09 PM
Thank you for clarifying Victor. 
Tags
General Discussions
Asked by
Raoul
Top achievements
Rank 1
Answers by
Viktor Zhivkov
Telerik team
Raoul
Top achievements
Rank 1
Share this question
or