Cache wsgi property (fixes GH-677)

This commit is contained in:
David Cramer 2015-12-10 11:15:02 -08:00
parent 8804d1b8fe
commit 6063125f9c
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ raven.contrib.django.middleware.wsgi
from __future__ import absolute_import
from raven.middleware import Sentry
from raven.utils import memoize
class Sentry(Sentry):
@ -21,7 +22,7 @@ class Sentry(Sentry):
def __init__(self, application):
self.application = application
@property
@memoize
def client(self):
from raven.contrib.django.models import client
return client