visualization: add setting to disable cache (#27407)
This commit is contained in:
parent
6451f27c18
commit
86b169bd6c
|
@ -170,5 +170,7 @@ SELECT2_CSS = xstatic('select2', 'select2.min.css')
|
|||
|
||||
BIJOE_SCHEMAS = []
|
||||
|
||||
BIJOE_CACHE = True
|
||||
|
||||
if 'BIJOE_SETTINGS_FILE' in os.environ:
|
||||
execfile(os.environ['BIJOE_SETTINGS_FILE'])
|
||||
|
|
|
@ -26,6 +26,7 @@ from django.utils.safestring import mark_safe
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.cache import cache
|
||||
from django.http import Http404
|
||||
from django.conf import settings
|
||||
|
||||
from ..utils import get_warehouses, human_join
|
||||
from ..engine import Engine
|
||||
|
@ -164,7 +165,8 @@ class Visualization(object):
|
|||
data = cache.get(key)
|
||||
if data is None:
|
||||
data = list(self.data())
|
||||
cache.set(key, data)
|
||||
if settings.BIJOE_CACHE:
|
||||
cache.set(key, data)
|
||||
return data
|
||||
|
||||
def table(self):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
BIJOE_CACHE = False
|
Loading…
Reference in New Issue