Thanks for the feedback! Regarding the value of maxAge, in the article I put ten seconds but I usually use a value close to twenty. This is because http requests may have a timeout (maybe not the best word to describe it) which may be longer than maxAge value.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
great and consise article, thanks!
looking at the memoization, any reason for choosing this value for maxAge? just wondering
const maxAge = 10000;
export const memoizedRefreshToken = mem(refreshTokenFn, {
maxAge,
});
Thanks for the feedback! Regarding the value of
maxAge
, in the article I put ten seconds but I usually use a value close to twenty. This is because http requests may have a timeout (maybe not the best word to describe it) which may be longer thanmaxAge
value.