smallrye-mutiny icon indicating copy to clipboard operation
smallrye-mutiny copied to clipboard

Rename `UniMemoize#atLeast`

Open jponge opened this issue 3 years ago • 1 comments

Discussed in https://github.com/smallrye/smallrye-mutiny/discussions/742

Originally posted by michalszynkiewicz November 5, 2021 For me, atLeast suggests that the value will be memoized/cached for the specified amount of time or longer (I'd guess might be stored in a weak reference after the period of time).

The discussion on a Stork PR says that the method is actually specifying time to live for the cached value. Could the method be renamed to e.g. forDuration?

CC @jponge

jponge avatar Nov 08 '21 18:11 jponge

/cc @michalszynkiewicz

jponge avatar Nov 08 '21 18:11 jponge

Is this issue still open?

sheltshamu avatar Aug 14 '23 17:08 sheltshamu

Yes, as we didn't find a good alternative.

cescoffier avatar Aug 17 '23 10:08 cescoffier

How about something like forFixedDuration? IMHO this would clarify that the memoization is only in effect for the specified amount of time.

siewp avatar Sep 01 '23 09:09 siewp

Ah, Nice. WDYT @jponge

cescoffier avatar Sep 01 '23 09:09 cescoffier

Yes that sounds good

jponge avatar Sep 01 '23 09:09 jponge

Great, I can provide a PR then :)

siewp avatar Sep 01 '23 11:09 siewp