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

fix: RedisStore with no expiration #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

speedytwenty
Copy link

I was unable to get the RedisStore to work no-expiration. Setting the maxAge to 0 seemed to lead to immediate expiration and setting the maxAge to Number.POSITIVE_INFINITY resulted in expires value being null.

So to solve this, I'm passing Number.POSITIVE_INFINITY as the maxAge and the RedisStore adjusts the expires value to 0.

This fix does feel a bit hackish. I can make adjustments if someone can point out a cleaner way to solve this.

@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #259 (9afc56c) into master (2d51cee) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #259   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          235       235           
=========================================
  Hits           235       235           
Impacted Files Coverage Δ
src/redis.js 100.00% <100.00%> (ø)
src/serialize.js 100.00% <0.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 2d51cee...9afc56c. Read the comment docs.

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.

1 participant