InvalidateCache for StorageCache Mechanism

Topics: General Topic
Dec 3, 2010 at 12:04 PM
Edited Dec 3, 2010 at 12:12 PM

Hi Andrea,

My query is in continuation with the post on Nov 16: Get All the list of (Roles, Tasks, Operations) for specific user . I used the code snippet example provided by you to retrieve all the authorizedItems for a specific user . I observed that the WCF cache service has an invalidate cache method exposed, but I would like to know whether there is a way to invalidate the storage cache whenver the authorizations are changed on SQL Storage.  

Coordinator
Dec 9, 2010 at 7:29 AM

Hi,

yes you have to invalidate the StorageCache.

You have 4 ways:

1) From the WCF code … invoke InvalidateCache() method.

2) Restart NetSqlAzMan WCF Cache Service

3) Run the Invalidate Service Cache console client (Start – Programs - .NET SQL Authorization Manager – Cache Service)

4) Restart the “.NET SQL Authorization Manager Cache Service” service.

Regards,

Andrea.

__________________________________
Andrea Ferendeles
NetSqlAzMan Project Coordinator
E-mail aferende@hotmail.com Web http://netsqlazman.codeplex.com

Dec 10, 2013 at 4:05 AM
Hi,

Is there a way to invalidate StorageCache?
I dont want to use WCF Cache service.

Regards
Rashmi
Coordinator
Dec 10, 2013 at 6:08 AM
Use the
NetSqlAzMan.Cache.StorageCache.BuildStorageCache()
method.
Dec 12, 2013 at 11:11 AM
Thanks Andrea.
But how do i invalidate this StorageCache ?
Coordinator
Dec 12, 2013 at 12:50 PM
Just invoke that method on your StorageCache instance ... I cannot understand your question.
O_O
Dec 13, 2013 at 5:36 AM
Hi Andrea,

NetSqlAzMan has two ways of caching the store data.
1)WCF cache service
2)NetSqlAzMan.Cache.StorageCache

I want to use the second option. Now, "NetSqlAzMan.Cache.StorageCache" class does not have a method for invalidating this cache.
So, how do i invalidate the cache built using "NetSqlAzMan.Cache.StorageCache" object instance ?
Coordinator
Dec 13, 2013 at 5:59 AM
RashmiSingh,
once again my answer is the same.
The cache can be invalidated, rebuilding it by invoking the method BuildStorageCache() of your StorageCache instance.
Dec 13, 2013 at 11:42 AM
ok..thanks.
got it