Do not store empty dict when using Region.get_or_create_multi with shoud_cache_fn
tsauerwein
Branch: tsauerwein/dogpile.cache:get_or_create_multi_should_cache
Branch: zzzeek/dogpile.cache:master
Declined
Declined pull request
Dear contributor - This pull request is being moved to Gerrit, at https://gerrit.sqlalchemy.org/181, where it may be tested and reviewed more closely. As such, the pull request itself is being marked "closed" or "declined", however your contribution is merely being moved to our central review system. Please register at https://gerrit.sqlalchemy.org#/register/ to send and receive comments regarding this item.
Closed by: Mike Bayer·2016-09-07
If
Region.get_or_create_multi
is used with ashould_cache
function and no value of the current set should be cached, do not try to store the empty dict in the backend. Some backends (e.g. the Redis backend) would fail in that case, because the dictionary is directly passend on.