Guys,

    I test below code and found the key(key1) still exists after 100
milliseconds(even longer), seems cache.WithExpiryPolicy does not work? 

    Can someone tell how to set ExpiryPolicy in config.xml? Thanks much!

    Code snippet:
    public static void WriteTestCache(IIgnite ignite)
        {
            try
            {
                cache = ignite.GetOrCreateCache<string,
string>("cache_test");
                cache.WithExpiryPolicy(new
ExpiryPolicy(TimeSpan.FromMilliseconds(100),
                TimeSpan.FromMilliseconds(100),
TimeSpan.FromMilliseconds(100)));

                cache.Put("key1", "value1");
            }
            catch (Exception ex)
            {
                Console.WriteLine("IgniteHttpTest:WriteTestCache, ex {0}",
ex);
            }
        }



--
View this message in context: 
http://apache-ignite-developers.2346864.n4.nabble.com/set-ExpiryPolicy-does-not-work-in-C-client-code-tp9833.html
Sent from the Apache Ignite Developers mailing list archive at Nabble.com.

Reply via email to