django-debug-toolbar icon indicating copy to clipboard operation
django-debug-toolbar copied to clipboard

CachePanel: monkeypatch Django's caches across sys.modules

Open blueyed opened this issue 8 years ago • 7 comments

Fixes https://github.com/jazzband/django-debug-toolbar/issues/799.

TODO:

  • [ ] cleanup (consistent naming)
  • [x] test(s)

blueyed avatar Aug 01 '17 20:08 blueyed

Codecov Report

Merging #982 into master will decrease coverage by 2.41%. The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #982      +/-   ##
==========================================
- Coverage   83.46%   81.04%   -2.42%     
==========================================
  Files          28       28              
  Lines        1578     1583       +5     
  Branches      235      236       +1     
==========================================
- Hits         1317     1283      -34     
- Misses        192      221      +29     
- Partials       69       79      +10
Impacted Files Coverage Δ
debug_toolbar/panels/cache.py 74.41% <78.57%> (-7.04%) :arrow_down:
debug_toolbar/compat.py 50% <0%> (-50%) :arrow_down:
debug_toolbar/management/commands/__init__.py 66.66% <0%> (-16.67%) :arrow_down:
debug_toolbar/panels/sql/utils.py 70.65% <0%> (-13.18%) :arrow_down:
debug_toolbar/panels/headers.py 95.45% <0%> (-4.55%) :arrow_down:
debug_toolbar/panels/templates/panel.py 86.4% <0%> (-1.6%) :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 88ddc7b...7268b2c. Read the comment docs.

codecov[bot] avatar Aug 01 '17 21:08 codecov[bot]

Codecov Report

Merging #982 into master will decrease coverage by <.01%. The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #982      +/-   ##
==========================================
- Coverage   83.46%   83.45%   -0.01%     
==========================================
  Files          28       28              
  Lines        1578     1584       +6     
  Branches      235      237       +2     
==========================================
+ Hits         1317     1322       +5     
- Misses        192      193       +1     
  Partials       69       69
Impacted Files Coverage Δ
debug_toolbar/panels/cache.py 81.53% <93.33%> (+0.08%) :arrow_up:

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 88ddc7b...45b1de3. Read the comment docs.

codecov[bot] avatar Aug 01 '17 21:08 codecov[bot]

This might work, but looks really really evil :-/

matthiask avatar Sep 06 '17 17:09 matthiask

Maybe https://github.com/jazzband/django-debug-toolbar/pull/800 would be less intrusive then? I was not aware that I did another PR already when doing this one..

blueyed avatar Sep 06 '17 17:09 blueyed

@blueyed could you please update this PR and fix the conflicts?

camilonova avatar Jul 21 '18 15:07 camilonova

Would be good to get a go considering its "evil-ness" before. /cc @matthiask @aaugustin

blueyed avatar Jul 22 '18 22:07 blueyed

Aside from a general feeling that this could cause issues, I don't have a strong opinion on this. If you're ready to support users after this change, you can merge it.

aaugustin avatar Jul 29 '18 10:07 aaugustin

The relevant code has changed a lot in this area. Please resubmit if you still want to work on this. Thanks in advance!

matthiask avatar Sep 16 '22 14:09 matthiask