cnaas-nms
cnaas-nms copied to clipboard
Select caching decorator based on run state
This introduces a new lru_cache
decorator that will change its behavior according to the current environment.
If imported in isolation, it selects the functools.lru_cache
implementation. If imported in a fully integrated system (ie. Redis connection settings are available), the RedisLRU cache implementation is used.
Codecov Report
Merging #235 (38fd256) into develop (45e0207) will increase coverage by
0.04%
. The diff coverage is88.00%
.
@@ Coverage Diff @@
## develop #235 +/- ##
===========================================
+ Coverage 59.64% 59.69% +0.04%
===========================================
Files 62 63 +1
Lines 6218 6233 +15
===========================================
+ Hits 3709 3721 +12
- Misses 2509 2512 +3
Impacted Files | Coverage Δ | |
---|---|---|
src/cnaas_nms/db/cache.py | 84.21% <84.21%> (ø) |
|
src/cnaas_nms/db/settings.py | 81.08% <100.00%> (-0.20%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 45e0207...38fd256. Read the comment docs.
This has actually been made redundant/obsolete by #245 - thanks @pboers1988 !