Skip to content

Honor expire_time/tag when FanoutCache get/pop times out - #367

Open
vinson0522 wants to merge 2 commits into
grantjenks:masterfrom
vinson0522:fix/fanout-timeout-expire-time
Open

Honor expire_time/tag when FanoutCache get/pop times out#367
vinson0522 wants to merge 2 commits into
grantjenks:masterfrom
vinson0522:fix/fanout-timeout-expire-time

Conversation

@vinson0522

Copy link
Copy Markdown

Fixes#354.

Cache.get/pop wrap a missing-key default as (default, None) or (default, None, None) when expire_time/tag are set. FanoutCache only did that on the success path; a Timeout or sqlite3.OperationalError returned the bare default, so value, expire = cache.get(key, expire_time=True) crashed.

Use the same wrap on the exception path for get and pop.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent return value in FanoutCache when requesting expire_time

1 participant

@vinson0522