Merge pull request #1495 from niphlod/fix/appadmin_ccache

fix ccache page in appadmin, thanks MDSIII
This commit is contained in:
mdipierro
2016-10-14 10:08:41 -05:00
committed by GitHub
3 changed files with 9 additions and 12 deletions
+2 -3
View File
@@ -409,7 +409,7 @@ def ccache():
import copy import copy
import time import time
import math import math
from gluon import portalocker from pydal.contrib import portalocker
ram = { ram = {
'entries': 0, 'entries': 0,
@@ -465,8 +465,7 @@ def ccache():
ram['keys'].append((key, GetInHMS(time.time() - value[0]))) ram['keys'].append((key, GetInHMS(time.time() - value[0])))
for key in cache.disk.storage: for key in cache.disk.storage:
value = cache.disk.storage[key] if key == 'web2py_cache_statistics' and isinstance(value[1], dict):
if isinstance(value[1], dict):
disk['hits'] = value[1]['hit_total'] - value[1]['misses'] disk['hits'] = value[1]['hit_total'] - value[1]['misses']
disk['misses'] = value[1]['misses'] disk['misses'] = value[1]['misses']
try: try:
@@ -409,7 +409,7 @@ def ccache():
import copy import copy
import time import time
import math import math
from gluon import portalocker from pydal.contrib import portalocker
ram = { ram = {
'entries': 0, 'entries': 0,
@@ -465,8 +465,7 @@ def ccache():
ram['keys'].append((key, GetInHMS(time.time() - value[0]))) ram['keys'].append((key, GetInHMS(time.time() - value[0])))
for key in cache.disk.storage: for key in cache.disk.storage:
value = cache.disk.storage[key] if key == 'web2py_cache_statistics' and isinstance(value[1], dict):
if isinstance(value[1], dict):
disk['hits'] = value[1]['hit_total'] - value[1]['misses'] disk['hits'] = value[1]['hit_total'] - value[1]['misses']
disk['misses'] = value[1]['misses'] disk['misses'] = value[1]['misses']
try: try:
+1 -2
View File
@@ -465,8 +465,7 @@ def ccache():
ram['keys'].append((key, GetInHMS(time.time() - value[0]))) ram['keys'].append((key, GetInHMS(time.time() - value[0])))
for key in cache.disk.storage: for key in cache.disk.storage:
value = cache.disk.storage[key] if key == 'web2py_cache_statistics' and isinstance(value[1], dict):
if isinstance(value[1], dict):
disk['hits'] = value[1]['hit_total'] - value[1]['misses'] disk['hits'] = value[1]['hit_total'] - value[1]['misses']
disk['misses'] = value[1]['misses'] disk['misses'] = value[1]['misses']
try: try: