streamlit
streamlit copied to clipboard
Add warning to st.memo when both persist="disk" and ttl parameters sp…
…ecified
📚 Context
Currently, our st.memo cache primitive doesn't support ttl
for the persistent cache. This PR logs warning about that.
We choose log warning instead of display it in the app.
-
What kind of change does this PR introduce?
- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring
- [X] Other: Log message about unsupported parameters combination
🧠 Description of Changes
-
Add bullet points summarizing your changes here
- [ ] This is a breaking API change
- [ ] This is a visible (user-facing) change
Revised:
Insert screenshot of your updated UI/code here
Current:
Insert screenshot of existing UI/code here
🧪 Testing Done
- [ ] Screenshots included
- [X] Added/Updated unit tests
- [ ] Added/Updated e2e tests
🌐 References
Does this depend on other work, documents, or tickets?
- Issue: Closes #XXXX
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
If it's not too much work, can we add unit tests for this?
If it's not too much work, can we add unit tests for this?
Yep, thanks Thomasz! Usually, we don't add checks for log messages, but maybe this is something we should change in the future
Test added :)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.