tomchristie/django-rest-framework — pull request #1917 by thedrow (2014-10-02 15:04:35+00:00)
Title: Used the cached_property decorator on the request object and the response object

I haven't changed any of the logic here since I did not want to break existing functionality but the private _* attributes should be removed in order to reduce the memory footprint of each request or response. If you can, please guide me how to do so without breaking existing functionality.
The benefit of using cached_property here is that we don't have to execute the if statement everytime. It's meaningful if your API is getting a lot of requests.