Click here to Skip to main content
15,909,242 members
Home / Discussions / C#
   

C#

 
AnswerRe: caching data on server in windows application in c# Pin
Subin Mavunkal24-May-11 22:00
Subin Mavunkal24-May-11 22:00 
GeneralRe: caching data on server in windows application in c# Pin
Richard MacCutchan24-May-11 23:32
mveRichard MacCutchan24-May-11 23:32 
AnswerRe: caching data on server in windows application in c# Pin
Eddy Vluggen25-May-11 0:18
professionalEddy Vluggen25-May-11 0:18 
AnswerRe: caching data on server in windows application in c# Pin
Pete O'Hanlon25-May-11 0:46
mvePete O'Hanlon25-May-11 0:46 
GeneralRe: caching data on server in windows application in c# Pin
siva45525-May-11 2:03
siva45525-May-11 2:03 
GeneralRe: caching data on server in windows application in c# Pin
Pete O'Hanlon25-May-11 2:19
mvePete O'Hanlon25-May-11 2:19 
GeneralRe: caching data on server in windows application in c# [modified] Pin
siva45525-May-11 19:02
siva45525-May-11 19:02 
GeneralRe: caching data on server in windows application in c# Pin
Pete O'Hanlon25-May-11 21:44
mvePete O'Hanlon25-May-11 21:44 
You would be OK using HttpRuntime.Cache. Basically, HttpContext.Current.Cache is a version of HttpRuntime.Cache. In fact, all that HttpContext.Current.Cache really does is pass the request onto HttpRuntime.Cache (the big difference being that HttpRuntime.Cache is available for all cases, so you can even use it in a console application if you want).

My sample wasn't meant to be used literally, rather it was to demonstrate some possible techniques. As it stands, it's not a totally robust situation as you could enter a situation where between the time of the lookup and the insert into the cache, another process inserts the data into the cache. If you code this robustly, you need to take this into account.

Forgive your enemies - it messes with their heads


My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility


AnswerRe: caching data on server in windows application in c# Pin
Luc Pattyn25-May-11 1:30
sitebuilderLuc Pattyn25-May-11 1:30 
AnswerRe: caching data on server in windows application in c# Pin
PIEBALDconsult25-May-11 2:50
mvePIEBALDconsult25-May-11 2:50 
AnswerRe: caching data on server in windows application in c# Pin
jschell25-May-11 10:16
jschell25-May-11 10:16 
QuestionTFS GetEffectivePermission and TF14014: Cannot query effective item or global permissions for other users. Pin
devvvy24-May-11 16:26
devvvy24-May-11 16:26 
QuestionWorking with multiple values in one field in an Access database Pin
Matt U.24-May-11 11:50
Matt U.24-May-11 11:50 
AnswerRe: Working with multiple values in one field in an Access database Pin
Paladin200024-May-11 12:12
Paladin200024-May-11 12:12 
GeneralRe: Working with multiple values in one field in an Access database Pin
Matt U.24-May-11 13:36
Matt U.24-May-11 13:36 
GeneralRe: Working with multiple values in one field in an Access database Pin
V.25-May-11 1:33
professionalV.25-May-11 1:33 
AnswerRe: Working with multiple values in one field in an Access database Pin
Roger Wright25-May-11 19:39
professionalRoger Wright25-May-11 19:39 
Questionconcatenate the word document, it's possible? Pin
abbd24-May-11 7:03
abbd24-May-11 7:03 
AnswerRe: concatenate the word document, it's possible? Pin
Eddy Vluggen25-May-11 0:19
professionalEddy Vluggen25-May-11 0:19 
AnswerRe: concatenate the word document, it's possible? Pin
Alan N25-May-11 2:05
Alan N25-May-11 2:05 
AnswerRe: concatenate the word document, it's possible? Pin
Dave Kreskowiak25-May-11 2:59
mveDave Kreskowiak25-May-11 2:59 
GeneralRe: concatenate the word document, it's possible? Pin
Alan N25-May-11 4:06
Alan N25-May-11 4:06 
GeneralRe: concatenate the word document, it's possible? Pin
Dave Kreskowiak25-May-11 6:22
mveDave Kreskowiak25-May-11 6:22 
AnswerRe: concatenate the word document, it's possible? Pin
RaviRanjanKr26-May-11 1:55
professionalRaviRanjanKr26-May-11 1:55 
GeneralRe: concatenate the word document, it's possible? Pin
abbd26-May-11 2:33
abbd26-May-11 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.