Add config for using Redis as cache, add memoize function to store results in cache.

This commit is contained in:
Chris Church
2016-02-23 16:23:19 -05:00
parent f30292c7f1
commit 891e06d6ef
6 changed files with 63 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
from rest_framework.exceptions import APIException
from awx.main.task_engine import TaskSerializer
from awx.main.utils import memoize
class LicenseForbids(APIException):
@@ -11,6 +12,7 @@ class LicenseForbids(APIException):
default_detail = 'Your Tower license does not allow that.'
@memoize()
def get_license(show_key=False, bypass_database=False):
"""Return a dictionary representing the license currently in
place on this Tower instance.