Hi there, we have an API that requires consistent high-performance, and as
part of profiling we've identified that large writes to memcache cause
problems. We would like to write to memcache after we have transmitted our
response to the client. My understanding is that (per the WSGI spec) we
ought to be able to yield our response and have that returned immediately
to Nginx, then do our memcache write after data has been transmitted to the
client.

Something like:
def handle_request():
  response = make_response()
  yield response # Response data goes out over the network
  memcache.write(response)

Is this correct? Are there are gotchas or caveats?

Thanks,
Craig
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to