]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Common decorator for caching methods
authorJakub Libosvar <libosvar@redhat.com>
Tue, 11 Feb 2014 14:59:06 +0000 (15:59 +0100)
committerJakub Libosvar <libosvar@redhat.com>
Thu, 22 May 2014 11:17:51 +0000 (13:17 +0200)
commit7508170498949818aed02ba0fd9b7f861e596320
tree98c71f3f30ca841aaa874401f8d15d7fa8373da5
parent90ab6717f040d10bc92deddb5f72118124c8d408
Common decorator for caching methods

Decorator caches methods' results, the key is composed from function
name and its parameters. Implementation of cache itself should be in
object implementing decorated method. Cache backend should be taken
from oslo-incubator.

Related-Bug: #1276440
Change-Id: Ibe3f1b2eb10b9601ad76ec24b7f0e3551b4013e2
neutron/common/utils.py
neutron/tests/unit/test_common_utils.py