I am trying to set a global expiring policy to a Ignite cache but it doesn't work, all the entries are still there even after the timeout value. This is how I am implementing it:
var igniteCache = this.igniteInstance.GetOrCreateCache<string, object>(configuraton);
var expiringTime = TimeSpan.FromSeconds(100);
igniteCache.WithExpiryPolicy(new ExpiryPolicy(expiringTime, expiringTime, expiringTime));
igniteCache.Put(key, value);
What am I doing wrong?
WithExpiryPolicy
returns a new cache instance, you should use it to insert entries with expiration: