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

Make Redis::increment/decrement() set a TTL #10796

Merged
merged 3 commits into from
Jun 20, 2017
Merged

Make Redis::increment/decrement() set a TTL #10796

merged 3 commits into from
Jun 20, 2017

Conversation

markstory
Copy link
Member

Continuing the work done in #10786 and adding tests. I've not modified the Memcached driver as memcached values will have a TTL set when the key is initially created.

I am targeting master with these changes as it is reasonable to expect that counters would work consistently across Redis and Memcached implementations (which they didn't) and these changes are normalizing behavior across backends.

Copy link
Member

@lorenzo lorenzo left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

@markstory markstory self-assigned this Jun 19, 2017
florianbrede-ayet and others added 3 commits June 19, 2017 20:59
Also update doc blocks to acknowledge that TTLs are set now.

Refs #10786
Because memcached doesn't allow cache keys to be incremented/decremented
without a default value (unless you use the binary protocol), we don't
need an explict TTL set as the key will have a TTL set when it is
initially written.

Refs #10786
@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #10796      +/-   ##
============================================
+ Coverage     94.91%   94.91%   +<.01%     
+ Complexity    12122    12116       -6     
============================================
  Files           422      422              
  Lines         30123    30107      -16     
============================================
- Hits          28591    28577      -14     
+ Misses         1532     1530       -2
Impacted Files Coverage Δ Complexity Δ
src/Cache/Engine/RedisEngine.php 93.82% <100%> (+0.49%) 32 <0> (ø) ⬇️
src/I18n/Translator.php 94.59% <0%> (-0.28%) 16% <0%> (-1%)
src/Mailer/Mailer.php 95.12% <0%> (-0.23%) 14% <0%> (-1%)
src/Controller/Component/PaginatorComponent.php 98.44% <0%> (-0.02%) 43% <0%> (ø)
src/Database/Schema/MysqlSchema.php 98.85% <0%> (-0.01%) 110% <0%> (-1%)
src/I18n/Parser/PoFileParser.php 100% <0%> (ø) 22% <0%> (+3%) ⬆️
src/Log/Engine/BaseLog.php 100% <0%> (ø) 14% <0%> (-2%) ⬇️
src/Shell/Helper/TableHelper.php 97.72% <0%> (ø) 20% <0%> (ø) ⬇️
src/Http/ServerRequestFactory.php 100% <0%> (ø) 33% <0%> (ø) ⬇️
src/Shell/Helper/ProgressHelper.php 100% <0%> (ø) 10% <0%> (ø) ⬇️
... and 3 more

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 7f24155...bd57bf9. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants