c# - DiskCache plugin strategy for e-mail images with tracking -


currently we're sending thousands of e-mails every day our customers. e-mail contains image url specific message id. when user downloads image, mark message opened in database. example:

http://cdn.mydomain.com/companylogos/{guid}.png?h=100&w=100&messageid=123 

at moment, every image request requires me byte[ ] of image cache. resize it. , return it. takes place in httphandler.

i take advantage of imageresizer.net , disk cache plugin. however, still need messageid-querystring parameter. i'm thinking solution.

extending httpmodule

public class custominterceptmodule : interceptmodule {     protected override void handlerequest(httpcontext context, httpmodulerequestassistant ra, ivirtualfile vf)     {         var messageidparam = context.request.querystring["messageid"];         int messageid;          if (!string.isnullorwhitespace(messageidparam) && int.tryparse(messageidparam, out messageid))         {             // id here            }          base.handlerequest(context, ra, vf);     } } 

does method still creates high performance, disk cached, results? or interrupting because i'm extending httpmodule , i'm adding own logic in there.

if goal increase performance and/or reduce work server needs do, suggest should not use full-size image tracking purposes, instead use invisible 1x1.png image track whether or not message opened, , use standard img url shares (that can distributed on cdn and/or cached) image people see.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -