Cache: compute cache id in a deterministic way
by using str on a dict we don't produce consistent results depending on hash randomization. This was visible with erp5_core_test:testCacheTool and PYTHONHASHSEED 12 , the cache id generated in https://lab.nexedi.com/nexedi/erp5/-/blob/a0aa9184d/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testCacheTool.py#L216-218 was "('py_script_obj', (60000,), {'result': 'a short value', 'portal_path': ('', 'erp5')})" and the cache id generated in https://lab.nexedi.com/nexedi/erp5/-/blob/a0aa9184d/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testCacheTool.py#L239-241 with same arguments for delete was "('py_script_obj', (60000,), {'portal_path': ('', 'erp5'), 'result': 'a short value'})")
Showing
Please register or sign in to comment