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

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

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