v";<vers...@gridgain.com>;
Date: Tue, Dec 1, 2015 08:33 PM
To: "user"<user@ignite.apache.org>;
Subject: Re: Can I set an expiry policy for some specify entry?
Hi Lin,
An expiry policy is working for all values, which were added through
cacheWithExpiryPolicy ac
Hi all,
We can easily set an expiry policy for any entry. Sorry to Anton and Vladimir
, you are right.
Talk is cheap, show you the code...
the test case
public static void testPut1() throws Exception {
getCache().put("key","val", TimeUnit.SECONDS.toMillis(1));
String val =
Lin,
As you can see at example you can use cache.withExpiryPolicy() to gain
cache wrapper with specific ExpiryPolicy.
This policy will be used during operations on this cache wrapper, only.
You can create as much wrappers as you need and put/get/etc entries using
them.
I recomend you to use