Skip to content

feat: enable the pMemoize's parameter maxAge to be passed as a rule option#169

Merged
azu merged 2 commits intotextlint-rule:masterfrom
ajfAfg:feat/enable-pMemoize-parameter-maxAge-to-be-passed-as-rule-option
Dec 21, 2025
Merged

feat: enable the pMemoize's parameter maxAge to be passed as a rule option#169
azu merged 2 commits intotextlint-rule:masterfrom
ajfAfg:feat/enable-pMemoize-parameter-maxAge-to-be-passed-as-rule-option

Conversation

@ajfAfg
Copy link
Contributor

@ajfAfg ajfAfg commented Dec 21, 2025

Background

When dealing with a large number of documents, the execution time for this rule often exceeds one hour. Previously, pMemoize's maxAge was always set to 30 seconds, which meant the same link could be inspected multiple times.

Approach

I added an option to specify pMemoize's maxAge. I named it linkMaxAge because I thought users might not immediately recognize maxAge as referring to cache duration. I don't consider this the best name, so I welcome suggestions for a better one.
In addition to the above change, I added an explanation about linkMaxAge to the README.

@azu azu added the Type: Feature New Feature label Dec 21, 2025
@azu azu merged commit d79ef62 into textlint-rule:master Dec 21, 2025
6 checks passed
@ajfAfg ajfAfg deleted the feat/enable-pMemoize-parameter-maxAge-to-be-passed-as-rule-option branch December 21, 2025 11:42
@github-actions github-actions bot mentioned this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants