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

Add a maximum age of object in pool #303

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pstonham
Copy link

@pstonham pstonham commented Jan 6, 2023

Added maxAgeMillis which if set will check the age of an object in the idle and evict if older than the value in MS.

Allows for eviction of old connections even if they've been used recently.

@matthieusieben
Copy link

Amazing ! I was just looking for this and had to implement it using the validate()

@matthieusieben
Copy link

Note that the effective value for evictionRunIntervalMillis should probably be something like Math.min(evictionRunIntervalMillis, maxAgeMillis) to avoid keeping overage resources alive for too long.

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