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

javascript - Hide toolbar of pdf file opened inside iframe using firefox -

Copy range with conditional formatting -

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