Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Static vs Cache

$
0
0

I am hitting database and retrieving data. The data will be changed only on daily basis. I want to store the data in the form of cache.

Right now, I am using static class object with dictionary as a cache.

I am not using any of the feature of cache object like dependency, sliding expiration etc, So I am sticking to static object to store the data and share it across. I am manually making static object as thread safe. Is there any disadvantage of using static variable instead of cache object?

Where is static data stored? I know it gets destroyed when we do IIS Reset. Is it stored in IIS memory? 

Where is cache data stored?

Thanks for the help in advance


Thanks


Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>