asp.net web api - Caching Data in Web API -


i have need cache collection of objects static (might have changes 1x per day) avaliable in asp.net web api odata service. result set used across calls (meaning not client call specific) needs cached @ application level.

i did bunch of searching on 'caching in web api' of results 'output caching'. not i'm looking here. want cache 'people' collection reused on subsequent calls (might have sliding expiration).

my question is, since still asp.net, use traditional application caching techniques persisting collection in memory, or there else need do? collection not directly returned user, rather used source behind scenes odata queries via api calls. there no reason me go out database on every call exact same information on every call. expiring hourly should suffice.

any 1 know how cache data in scenario?

yes, output caching not looking for. can cache data in memory memorycache example, http://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache.aspx . however, lose data if application pool gets recycled. option use distributed cache appfabric cache or memcache name few.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -