Fix inconsistent caching
This commit is contained in:
parent
132c85c1fd
commit
002be2be12
8
main.py
8
main.py
@ -27,18 +27,16 @@ class JSONProviderX(DefaultJSONProvider):
|
||||
class CacheProxyRPC(util.CacheProxy):
|
||||
def __init__(self, obj, persistent=None, volatile=None, prefix=''):
|
||||
util.CacheProxy.__init__(self, obj)
|
||||
if persistent is None:
|
||||
persistent = util.Store().memo
|
||||
if volatile is None:
|
||||
volatile = util.Store().memo
|
||||
self._cache(('__call__', 'close', 'authenticate', 'keepalive', 'XWB_CREATE_CONTEXT', 'XWB_IM_HERE', 'TIU_TEMPLATE_GETROOTS', 'TIU_TEMPLATE_GETPROOT', 'TIU_TEMPLATE_GETBOIL', 'TIU_TEMPLATE_GET_DESCRIPTION', 'TIU_TEMPLATE_GETITEMS', 'TIU_TEMPLATE_SET ITEMS', 'TIU_TEMPLATE_CREATE/MODIFY', 'TIU_TEMPLATE_DELETE', 'TIU_TEMPLATE_LOCK', 'TIU_TEMPLATE_UNLOCK', 'SDEC_CRSCHED', 'ORWDXM1_BLDQRSP'), None)
|
||||
self._cache(('SDEC_RESOURCE', 'ORWU1_NEWLOC', 'ORWLRR_ALLTESTS_ALL', 'ORWORDG_ALLTREE', 'ORWORDG_REVSTS', 'ORWDX_DGNM', 'ORWDX_ORDITM'), persistent, prefix=prefix, ttl=float('inf'))
|
||||
self._cache(('__call__', 'close', 'authenticate', 'keepalive', 'XWB_CREATE_CONTEXT', 'XWB_IM_HERE', 'TIU_TEMPLATE_GETROOTS', 'TIU_TEMPLATE_GETPROOT', 'TIU_TEMPLATE_GETBOIL', 'TIU_TEMPLATE_GET_DESCRIPTION', 'TIU_TEMPLATE_GETITEMS', 'TIU_TEMPLATE_SET ITEMS', 'TIU_TEMPLATE_CREATE/MODIFY', 'TIU_TEMPLATE_DELETE', 'TIU_TEMPLATE_LOCK', 'TIU_TEMPLATE_UNLOCK', 'SDEC_CRSCHED', 'ORWDX_SAVE', 'ORWDXM1_BLDQRSP'), None)
|
||||
self._cache(('XWB_GET_BROKER_INFO', 'XUS_INTRO_MSG'), volatile, prefix=prefix, ttl=float('inf'))
|
||||
self._cache(None, volatile, prefix=prefix, ttl=float('-inf'))
|
||||
self._cache_persistent(persistent=persistent, prefix=prefix)
|
||||
def _cache_persistent(self, persistent=None, prefix=''):
|
||||
if persistent is None:
|
||||
persistent = util.Store().memo
|
||||
self._cache(('SDEC_RESOURCE', 'ORWLRR_ALLTESTS_ALL'), persistent, prefix=prefix, ttl=float('inf'))
|
||||
self._cache(('SDEC_RESOURCE', 'ORWU1_NEWLOC', 'ORWLRR_ALLTESTS_ALL', 'ORWORDG_ALLTREE', 'ORWORDG_REVSTS', 'ORWDX_DGNM', 'ORWDX_ORDITM'), persistent, prefix=prefix, ttl=float('inf'))
|
||||
|
||||
def application():
|
||||
app = Flask(__name__)
|
||||
|
Loading…
Reference in New Issue
Block a user