Closed GoogleCodeExporter closed 9 years ago
yep, that did occur to me at one point in time after i implemented the json
support. figured relatively few people would be querying for multiple mime
types (and using the caching), so it was low on the priority list. this is a
relatively simple fix though, thanks.
Original comment by jahlborn@gmail.com
on 13 Jan 2012 at 11:51
actually, after looking at this more closely, it turns out this is not as
simple as it seems. unfortunately, caching GET calls for individual model
properties is a bit more complexv (determining the mime type is more
complicated than just calling best_match).
Original comment by jahlborn@gmail.com
on 18 Jan 2012 at 3:26
I've figured out how to fix this so that a caller will not get an incorrectly
formatted response. The cache will still only cache one response per url,
however, it maintains the original request "accept" header with the cached
info. if an incoming request does not have the same accept header, the cached
response will not be returned.
while this may not be "perfect" in terms of caching (multiple clients using
different accept headers for the same header will thrash the cache), it _will_
ensure that callers always get the correct response type. and in most
scenarios, i wouldn't imagine that an application is getting a lot of requests
for the same url w/ different accept headers.
Original comment by jahlborn@gmail.com
on 6 Jul 2012 at 4:28
This issue was closed by revision r109.
Original comment by jahlborn@gmail.com
on 6 Jul 2012 at 4:35
Original issue reported on code.google.com by
adroffner
on 13 Jan 2012 at 6:06