Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

RedisStore - Using direct Redis commands instead of hash Redis commands - #206 #216

Merged
4 commits merged into from
Feb 3, 2021

Conversation

arvind-bhaskar
Copy link
Contributor

  • To avoid iterating all the keys, the max length should not be specified.
  • Because of the absence of max length, the size of the Redis hash list increases and instill the memory load in the Redis server.
  • Even if the max length is specified, we can use the scan command to iterate through keys 1000 at a time. It optimizes the flow.
  • For the namespace, we can prefix the key.
  • To overcome this, we can use the direct Redis commands with separate TTL for every key. On the expiration of the TTL, the Redis itself deletes the key.
  • We can provide the developers with two different options to use the RedisStore either by hash commands or by direct commands.

This is a fix for the issue
#206

@codecov
Copy link

codecov bot commented Sep 18, 2020

Codecov Report

Merging #216 (55305fb) into master (44d7227) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #216   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        13    +1     
  Lines          192       230   +38     
=========================================
+ Hits           192       230   +38     
Impacted Files Coverage Δ
src/redis-default.js 100.00% <100.00%> (ø)

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 44d7227...55305fb. Read the comment docs.

@ghost
Copy link

ghost commented Feb 1, 2021

Hello @arvind-bhaskar!

Thanks for the contribution, would you mind resolving the conflicts and actually remove the dist files from the PR (I'll rebuild everything when I post a release) then I'll gladly merge it 🙂

Thank you!

@ghost ghost merged commit aa0666f into lisaogren:master Feb 3, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants