Skip to content

Commit 35be0b9

Browse files
authored
docs: clarify ancestor code is still important for cache invalidation (#7473)
## 📝 Summary fixes #7455 Clarify caching docs
1 parent b817746 commit 35be0b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

marimo/_save/save.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,9 +907,9 @@ def fib(n):
907907
908908
`mo.cache` is similar to `functools.cache`, but with three key benefits:
909909
910-
1. `mo.cache` persists its cache even if the cell defining the
911-
cached function is re-run, as long as the code defining the function
912-
(excluding comments and formatting) has not changed.
910+
1. `mo.cache` persists its cache even if the cell defining the cached
911+
function is re-run, as long as the code defining the function and
912+
ancestors (excluding comments and formatting) has not changed.
913913
2. `mo.cache` keys on closed-over values in addition to function arguments,
914914
preventing accumulation of hidden state associated with
915915
`functools.cache`.

0 commit comments

Comments
 (0)