Re: How to get the configuration of a given cache in Apache Ignite?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: How to get the configuration of a given cache in Apache Ignite?

Alexey Goncharuk
Hi,

As Andrey pointed out, now you can grab an expiry policy factory from
Ignite's cache configuration, create an instance and get durations you
need. I agree that this way a bit awkward and it only covers a configured
ExpiryPolicy, currently there is no way to check if an instance of
IgniteCache was created using withExpiryPolicy() method.

I think it should be ok to add getExpiryPolicy() on IgniteCache which will
return a configured expiry policy (possibly null) if this is a default
cache instance, and user-specified expiry policy if cache instance was
created using withExpiryPolicy().

Cross-posting this to Ignite dev list to see what dev community thinks.