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
Post a Comment