MrChang0 commented on issue #1632:
URL:
https://github.com/apache/incubator-fury/issues/1632#issuecomment-2118880766
just like
```java
@Test
public void testCache() throws InterruptedException {
Cache<String, String> cache =
CacheBuilder.newBuilder().expireAfterAccess(Duration.ofSeconds(1)).build();
cache.put("1", "1");
cache.put("2", "2");
Assert.assertEquals(cache.size(), 2);
Thread.sleep(800);
cache.getIfPresent("1");
cache.cleanUp();
Assert.assertEquals(cache.size(), 2);
Thread.sleep(800);
cache.getIfPresent("1");
Assert.assertEquals(cache.size(), 2);
Thread.sleep(800);
cache.getIfPresent("1");
Assert.assertEquals(cache.size(), 2);
cache.cleanUp();
Assert.assertEquals(cache.size(), 1);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]