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

When Expiration Policy is ACCESSED, New short duration time does not is rescheduled. #57

Open
reachmirai opened this issue May 14, 2018 · 2 comments

Comments

@reachmirai
Copy link

In putInternal src,when entry != null,ExpirationPolicy and expirationNanos is ignored
Why?

@LuboVarga
Copy link

It than forces us to use code like this:

                cache.put(bet.getId(), bet);
                cache.setExpiration(
                        bet.getId(),
                        betExpirationDuration,
                        TimeUnit.MILLISECONDS);

instead of this one:

                cache.put(bet.getId(), bet, betExpirationDuration, TimeUnit.MILLISECONDS);

Parameter expirationNanos is not used in else branch here: https://github.com/jhalterman/expiringmap/blob/master/src/main/java/net/jodah/expiringmap/ExpiringMap.java#L1261

Imho it is a bug or at least undocumented "feature".

@jhalterman
Copy link
Owner

Do you have a unit test that demonstrates the problem?

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

No branches or pull requests

3 participants