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 -

SoapUI on windows 10 - high DPI/4K scaling issue -

java - why am i getting a "cannot resolve method" error on getApplication? -