Commits

funkybob  committed abcf98c

Added utils module

  • Participants
  • Parent commits d2bf037

Comments (0)

Files changed (1)

File gnocchi_forum/utils.py

+
+class CachedProperty(object):
+    def __init__(self, get_func):
+        self.get_func = get_func
+
+    def __get__(self, obj):
+        if not hasattr(self, 'value'):
+            self.value = self.get_func(obj)
+        return self.value
+