locked
put one object in local cache and another object in disrtibuted cache

    Question

  • Hello all,

    i know how to configure local cache both in webconfig and in code.

    i want to be able in runtime to put one object in local cache and another object in disrtibuted cache.

    can i do that? is it possible?

    Thank a lot, ido


    Monday, March 4, 2013 10:49 AM

Answers

  • You can accomplish this by creating two named caches.  One named cache with notifications enabled and one that does not.  I have implemented this within my caching layer.  I use the region name to determine what goes to local and what is purely for the distributed cache.

    With either approach the object must utilize the distributed cache.  The cache client will bring it in process only if you have notifications enabled.  You cannot use the local cache by itself.

    Monday, March 4, 2013 7:26 PM

All replies

  • You can accomplish this by creating two named caches.  One named cache with notifications enabled and one that does not.  I have implemented this within my caching layer.  I use the region name to determine what goes to local and what is purely for the distributed cache.

    With either approach the object must utilize the distributed cache.  The cache client will bring it in process only if you have notifications enabled.  You cannot use the local cache by itself.

    Monday, March 4, 2013 7:26 PM
  • Thank you so much! you explained it plain and simple.

    hope we'll meet again (-;

    ido

    Thursday, March 7, 2013 10:46 PM