Skip to content

Commit c54ec19

Browse files
committed
only cache if the value is not None
1 parent 2818672 commit c54ec19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

twitchio/cache.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def _wraps(cls, id: Hashable):
9292
return cache[id]
9393

9494
value = func(cls, id)
95-
cache[id] = value
95+
if value is not None:
96+
cache[id] = value
97+
9698
return value
9799

98100
return _wraps

0 commit comments

Comments
 (0)