.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.
- you can cache using iis again (potentially faster implementation of caching)
- reverse proxy caching works well
- your client's isp proxy cache works too
- your client's os/browser caching works well
- heck, proxy decompression clients not support gzip
the pattern described here http redirection canonical url.
simples!
ps try use 303 redirect if possible
Comments
Post a Comment