-
- Downloads
common/utils: Add a django_cache decorator and use it in codebase
Add a decorator enabling to put the result of a function call in Django cache, subsequent calls will then directly return the cached value. Use that decorator whenever it is possible in swh-web codebase to simplify the handling of cached values and improve code readability.
Showing
- swh/web/browse/snapshot_context.py 7 additions, 19 deletionsswh/web/browse/snapshot_context.py
- swh/web/browse/utils.py 11 additions, 21 deletionsswh/web/browse/utils.py
- swh/web/common/utils.py 62 additions, 16 deletionsswh/web/common/utils.py
- swh/web/misc/coverage.py 52 additions, 43 deletionsswh/web/misc/coverage.py
- swh/web/tests/common/test_utils.py 76 additions, 0 deletionsswh/web/tests/common/test_utils.py
Loading
Please register or sign in to comment