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

Create hunt.caching module, using radix container. #27

Open
zoujiaqing opened this issue Nov 30, 2018 · 1 comment
Open

Create hunt.caching module, using radix container. #27

zoujiaqing opened this issue Nov 30, 2018 · 1 comment

Comments

@zoujiaqing
Copy link
Member

zoujiaqing commented Nov 30, 2018

Use Caffeine or JCache API (JSR 107) api design.

@zoujiaqing
Copy link
Member Author

auto cache = new CacheBuilder!(String, String)() {}
    .expireAfterWrite(5.MINUTES)    // expire/refresh after 5 minutes
    .resilienceDuration(30.SECONDS) // cope with at most 30 seconds
                                              // outage before propagating 
                                              // exceptions
    .refreshAhead(true)                       // keep fresh when expiring
    .build();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant