2nd Level Cache - how to share between applications

Thread is closed for posting
3 posts, 1 answers
  1. kzimny
    kzimny avatar
    11 posts
    Member since:
    Jul 2007

    Posted 08 Nov 2015 Link to this post

    Is there another way beside MSMQ to share 2nd Level Cache between two applications hosted on the same web server?
    In my scenario there are two virtual directories located in the same application Domain:

    mydomain.com is the root folder and the virtual directories are mydomain.com/ApplicationA (for WebForms) and mydomain.com/ApplicationB (for MVC).

    Both virtual directories share the same HttpContext and have the same application pool. MSMQ can not be used due to the shared hosting environment.
    How to synchronize the 2nd Level Cache between both applications if data changed in one of the application?
  2. Answer
    Thomas avatar
    590 posts

    Posted 11 Nov 2015 Link to this post

    Hi Krzysztof,

    I've put together a git  project under


    that shows how to implement a custom second level cache cluster eviction mechanism with TCP or RDP.
    This solution provides you with a starting point for your own implementations.
    There will be
    no official support for this project from Telerik/Progress.

    I kindly ask you to contribute changes/improvements back so that other customers could benefit from it. (The license does not require this.) 

    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.

  3. kzimny
    kzimny avatar
    11 posts
    Member since:
    Jul 2007

    Posted 12 Nov 2015 in reply to Thomas Link to this post

    Hi Thomas,

    thank you so much for the link! Your implementation for sharing 2nd Level Cache between applications works perfect in my shared hosting enviroment. I extended the CustomizeBackendConfiguration class with partial class DbContect.partial.cs class as follow:


    public partial class DbContext
        protected override void OnDatabaseOpen(Telerik.OpenAccess.BackendConfiguration backendConfiguration,
            Telerik.OpenAccess.Metadata.MetadataContainer metadataContainer)
            string sName = typeof(CustomSecondLevelCacheClusterTransport.UdpMulticastClusterTransport).AssemblyQualifiedName;
            backendConfiguration.SecondLevelCache.Enabled = true;
            backendConfiguration.SecondLevelCache.Synchronization.Enabled = true;
            backendConfiguration.SecondLevelCache.Synchronization.Name = sName;
            backendConfiguration.SecondLevelCache.Synchronization.Localpath = "MickeyMouse";


    UDP multicast implementation seems to work in (our) shared hosting enviroment.




Back to Top