Hello guys I have a List that I want to show for all users the same list without make an other query at my database.
Searching on forums I found that OutPutCache is the best way that I can follow, but I really don’t understand how can I do that.
[EDIT]
Is OutPutCache the best way to do that?
You’re getting too far along here; if all you have is a single
List<T>that you want to keep in memory for a while, you dont need output caching. Output caching is when you want to cache the entire rendered page to send to users without recalling your controller.You just need to persist the object in memory, either via a shared variable or plain old caching.