.net - Caching compressed data from WCF on IIS -


i have wcf service hosted on iis. size of responses quite big require dynamic data compression enabled on iis side (service uses wshttpbinding).

at point realize need caching of compressed data too. each of requests server unique return 1 of few possible values. means can't use iis caching because each request different. on other hand can't use wcf caching because doesn't know iis compressing, have re-compress cached data on , on again.

is there way work iis compressed data cache wcf/.net code? other known solutions?

given payload large, assume round trip add negligible latency. therefore suggest you take full advantage of fact on http.

write service behavior detects on http. once determine of large objects "returning", intercept return call, , replace httpcontext.response.redirect().

then write separate service host actual results http get deterministic url.

the advantages get.

  1. you can cache using iis again (potentially faster implementation of caching)
  2. reverse proxy caching works well
  3. your client's isp proxy cache works too
  4. your client's os/browser caching works well
  5. heck, proxy decompression clients not support gzip

the pattern described here http redirection canonical url.

simples!

ps try use 303 redirect if possible


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -