asp.net mvc - How to use Object caching on View page MVC -


i working mvc project. having access of view page in 1 project load using view engine.

now want use object caching on view page not want call service method every time.

is there way this? appreciated. thanks.

you can cache view :

[outputcache(duration = 10)] public actionresult details(int id)         {             viewdata.model = _datacontext.movies.singleordefault(m => m.id == id);             return view();         } 

Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

c - Defining floating point constants, how many digits are useful? -

C# Apple Bonjour - how to monitor service records within Windows -