We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm not seeing entries expiring according to the Expiry date.
public static void main(String[] args) throws InterruptedException { String[] servers = { "localhost:11212" }; Integer[] weights = {1}; SockIOPool pool = SockIOPool.getInstance("Test2"); pool.setServers( servers ); pool.setWeights(weights); pool.setMinConn(2); pool.setMaxConn(20); pool.setFailover( true ); pool.setInitConn( 30 ); pool.setMaintSleep( 90 ); pool.setSocketTO( 2000 ); pool.setAliveCheck( true ); pool.initialize(); MemCachedClient mcc = new MemCachedClient("Test2"); Date expiration = new Date(System.currentTimeMillis()+3000); mcc.set("pet", "cat", expiration); String value = (String) mcc.get("pet"); System.out.println("before sleep: got " + value + " from the cache"); Thread.sleep(4000); value = (String) mcc.get("pet"); System.out.println("after sleep: got " + value + " from the cache"); }
Results: before sleep: got cat from the cache after sleep: got cat from the cache
I expected the second get to return null, as the entry should have expired in 3 seconds. Am I missing something?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm not seeing entries expiring according to the Expiry date.
Results:
before sleep: got cat from the cache
after sleep: got cat from the cache
I expected the second get to return null, as the entry should have expired in 3 seconds. Am I missing something?
The text was updated successfully, but these errors were encountered: