~lazr-developers/lazr.restful/trunk

« back to all changes in this revision

Viewing changes to src/lazr/restful/jsoncache.py

  • Committer: Colin Watson
  • Date: 2016-02-17 01:07:21 UTC
  • Revision ID: cjwatson@canonical.com-20160217010721-4d5fqqml5q97ss59
Switch zope.interface, zope.component, and lazr.delegates users from class advice to class decorators.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
from lazr.restful.interfaces import (
12
12
    IJSONRequestCache, LAZR_WEBSERVICE_NS)
13
13
 
14
 
from zope.component import adapts
15
 
from zope.interface import implements
 
14
from zope.component import adapter
 
15
from zope.interface import implementer
16
16
from zope.publisher.interfaces import IApplicationRequest
17
17
 
 
18
@implementer(IJSONRequestCache)
 
19
@adapter(IApplicationRequest)
18
20
class JSONRequestCache:
19
21
    """Default implementation for `IJSONRequestCache`."""
20
 
    implements(IJSONRequestCache)
21
 
    adapts(IApplicationRequest)
22
22
 
23
23
    LAZR_OBJECT_JSON_CACHE = ("%s.object-json-cache"
24
24
                              % LAZR_WEBSERVICE_NS)