1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-23 23:51:58 +00:00

honor POWERLEVEL9K_MAX_CACHE_SIZE

This commit is contained in:
romkatv 2019-03-12 14:00:52 +01:00
parent a0d2449c43
commit c9ee989e38

View file

@ -131,6 +131,7 @@ _p9k_cache_set() {
# echo "caching: ${(@0q)_P9K_CACHE_KEY} => (${(q)@})" >&2 # echo "caching: ${(@0q)_P9K_CACHE_KEY} => (${(q)@})" >&2
_P9K_CACHE[$_P9K_CACHE_KEY]="${(pj:\0:)*}" _P9K_CACHE[$_P9K_CACHE_KEY]="${(pj:\0:)*}"
_P9K_CACHE_VAL=("$@") _P9K_CACHE_VAL=("$@")
(( #_P9K_CACHE < POWERLEVEL9K_MAX_CACHE_SIZE )) || typeset -gAH _P9K_CACHE=()
} }
_p9k_cache_get() { _p9k_cache_get() {