asp.net mvc - Why are my images not cached although I configured OUTPUTCACHE? -
so, trying configure caching mvc5 application optimization purposes. although put outputcache attribute on controller action method can't see images cached. here controller action:
[outputcache(duration = 60, location = outputcachelocation.serverandclient, nostore=true, varybyparam = "resultid")] public filecontentresult getpicture(string resultid) { var actionlinks = db.actionlinks.tolist(); var actionlinkpic = actionlinks.firstordefault(p => p.id == resultid); if (actionlinks != null) { return file(actionlinkpic.tpicture, actionlinkpic.tpicturemimetype); } else { return null; } } here network response in firefox:
the network response:
you have nostore=true
the nostore property disables caching - commonly used disable caching requests (which cached default).
change nostore=false
unfortunately there little documentation outputcacheattribute, extent have experiment options, , see happens.

Comments
Post a Comment