मेरे पास कुछ महंगा कोड कैश करने के लिए निम्न कोड है।यदि मैं स्पष्ट समाप्ति नहीं करता हूं तो डिफ़ॉल्ट रूप से सामान httpcache में रहते हैं?
private MyViewModel GetVM(Params myParams)
{
string cacheKey = myParams.runDate.ToString();
var cacheResults = HttpContext.Cache[cacheKey] as MyViewModel ;
if (cacheResults == null)
{
cacheResults = RunExpensiveCodeToGenerateVM(myParams);
HttpContext.Cache[cacheKey] = cacheResults;
}
return cacheResults;
}
यह कैश में हमेशा के लिए रहेगा? जब तक सर्वर रीबूट या स्मृति से बाहर नहीं चला जाता है?