Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel the previous ttl timer if exists when setting a new value in the in-memory cache #424

Merged
merged 7 commits into from
Nov 12, 2018

Conversation

minhtule
Copy link
Contributor

@minhtule minhtule commented Nov 10, 2018

This PR is branched out from the v0.10.0 version bump commit because there is some change on master (e.g. 634348f) that is not backward compatible with 0.10.0.

@codecov
Copy link

codecov bot commented Nov 10, 2018

Codecov Report

Merging #424 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
+ Coverage   99.77%   99.77%   +<.01%     
==========================================
  Files           9        9              
  Lines         871      873       +2     
  Branches       95       96       +1     
==========================================
+ Hits          869      871       +2     
  Misses          2        2
Impacted Files Coverage Δ
aiocache/backends/memory.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ae5b74...a8d8a07. Read the comment docs.

@minhtule minhtule force-pushed the fix_in_memory_ttl branch 3 times, most recently from c58b60e to 86cb33e Compare November 11, 2018 02:44

await asyncio.sleep(0.05)
assert await memory_cache.get(pytest.KEY) == "new_value"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @minhtule lets move this test to TestCache and use the cache fixture. This way we ensure all backends behave in a consistent way :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. I've moved the test there.

@minhtule
Copy link
Contributor Author

minhtule commented Nov 12, 2018

@argaen I'm not sure why the 2 checks are still pending. Could you please take a look?

Also I notice that the TestCachedStampede.test_cached_stampede test can randomly fail like in this build (I saw it before too).

@argaen
Copy link
Member

argaen commented Nov 12, 2018

@argaen I'm not sure why the 2 checks are still pending. Could you please take a look?

Yeah.. it happened to me sometimes too, if the build passes correctly (I've resync with master) I'll merge the changes

Also I notice that the TestCachedStampede.test_cached_stampede test can randomly fail like in this build (I saw it before too).

I know... It's been there for a while but haven't dedicated time to investigate TBH. Happy to accept PRs :D

@argaen argaen merged commit 65488c5 into aio-libs:master Nov 12, 2018
@argaen
Copy link
Member

argaen commented Nov 12, 2018

Merged, tomorrow I'll do a bugfix release, thanks :)

@minhtule
Copy link
Contributor Author

Thank you @argaen !

@argaen
Copy link
Member

argaen commented Nov 16, 2018

@minhtule released yesterday with 0.10.1

@minhtule
Copy link
Contributor Author

Got it. Thank you @argaen !

@minhtule minhtule deleted the fix_in_memory_ttl branch November 17, 2018 00:39
Sign up for free to 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.

2 participants