Merged
Conversation
kantuni
approved these changes
Feb 27, 2020
* develop: Py2k Decimation: first pass, removing compatibility.py (streamlit#1127) Upgrading vega and vega-lite (streamlit#1156) Fixing progressbar animation when switching tabs (streamlit#1149) Raise our default max_upload_size to 200 MB (streamlit#1151) Fixing examples on mobile (streamlit#1145)
sthagen
added a commit
to sthagen/streamlit-streamlit
that referenced
this pull request
Mar 3, 2020
st.cache expiration (streamlit#1152)
Merged
tconkling
added a commit
that referenced
this pull request
Mar 10, 2020
This fixes breakage that I introduced in #1152 Rather than creating the cache as a local variable in the st.cache wrapper, we instead manage all caches in a global `_MemCaches` class. Each cache is keyed off its wrapped function's fully qualified name, and its contents. There's a new `ScriptRunner` test that makes sure that caches are reused across multiple runs of the same script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
ttlandmax_entriesparams to@st.cache@st.cached function now has its own in-memory cache (previously, all functions shared a single cache).cachetools.LRUCacheandcachetools.TTLCachereplace raw dictionaries as the cache implementations.This closes #364. (Well, partly: per discussions with @tvst and @treuille, the other bits of that ticket (
globalandfinalizer_funcoptions) are going to wait for more discussion about caching changes.)