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:

enter image description here

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

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -