fix(tarpit): compare hit age against maxHitsDuration in the same unit by menoz · Pull Request #741 · moqui/moqui-framework · GitHub
Skip to content

fix(tarpit): compare hit age against maxHitsDuration in the same unit - #741

Open
menoz wants to merge 1 commit into
moqui:masterfrom
menoz:menoz-patch-1
Open

menoz wants to merge 1 commit into
moqui:masterfrom
menoz:menoz-patch-1

Conversation

@menoz

@menoz menoz commented Aug 29, 2026

Copy link
Copy Markdown

hitTime and checkTime are milliseconds; maxHitsDuration is seconds. For any hit already recorded, hitTime - checkTime is negative and therefore always lower than a positive maxHitsDuration, so the condition is always true: every cached hit is counted regardless of how old it is.

hitTime and checkTime are milliseconds; maxHitsDuration is seconds. For any hit already recorded, hitTime - checkTime is negative and therefore always lower than a positive maxHitsDuration, so the condition is always true: every cached hit is counted regardless of how old it is.
@menoz menoz changed the title Update ArtifactExecutionFacadeImpl.groovy fix(tarpit): compare hit age against maxHitsDuration in the same unit Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant