Python client: create cache with expiration policy

classic Classic list List threaded Threaded
5 messages Options
kulinskyvs kulinskyvs
Reply | Threaded
Open this post in threaded view
|

Python client: create cache with expiration policy

This post was updated on .
Hello all,
I'm wondering whether it's possible to create a cache with expiration policy defined from Python client?
Documentation says nothing about this.
Thank you in advance.
aealexsandrov aealexsandrov
Reply | Threaded
Open this post in threaded view
|

Re: Python client: create cache with expiration policy

Hi,

Yes, it should be possible. Please read the documentation from binaries:

https://github.com/apache/ignite/blob/master/modules/platforms/python/docs/datatypes/cache_props.rst

PROP_PARTITION_LOSS_POLICY:

Partition loss policy: READ_ONLY_SAFE=0, READ_ONLY_ALL=1, READ_WRITE_SAFE=2,
READ_WRITE_ALL=3, IGNORE=4

BR,
Andrei



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
kulinskyvs kulinskyvs
Reply | Threaded
Open this post in threaded view
|

Re: Python client: create cache with expiration policy

Hi,

Are we talking about the same? I mean, my goal is to create a cache (if not
yet created) with some predefined expiration policy in order to be able to
set the expiration timeout for key/value pair put into Ignite.

Looks like  you are referring to
https://apacheignite.readme.io/docs/partition-loss-policies,
while I'm interested in https://apacheignite.readme.io/docs/expiry-policies.

Thanks.

Best regards,
Vadzim Kulinski



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
aealexsandrov aealexsandrov
Reply | Threaded
Open this post in threaded view
|

Re: Python client: create cache with expiration policy

Yes, it's my fault. I double check the list of existed options and looks like
there is no expire policy option there.

I see that exists PROP_EAGER_TTL property:

https://apacheignite.readme.io/docs/expiry-policies#section-eager-ttl

But there are no options for expiration policies.

Let me some time to check the source code.

BR,
Andrei



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
aealexsandrov aealexsandrov
Reply | Threaded
Open this post in threaded view
|

Re: Python client: create cache with expiration policy

In reply to this post by kulinskyvs
Hi,

Looks like Python API should be improved.

I created the ticket on this:

https://issues.apache.org/jira/browse/IGNITE-11965

BR,
Andrei

On 2019/06/03 11:09:29, kulinskyvs <[hidden email]> wrote:
 > Hi,>
 >
 > Are we talking about the same? I mean, my goal is to create a cache
(if not>
 > yet created) with some predefined expiration policy in order to be
able to>
 > set the expiration timeout for key/value pair put into Ignite.>
 >
 > Looks like you are referring to>
 > https://apacheignite.readme.io/docs/partition-loss-policies,>
 > while I'm interested in
https://apacheignite.readme.io/docs/expiry-policies.>
 >
 > Thanks.>
 >
 > Best regards,>
 > Vadzim Kulinski>
 >
 >
 >
 > -->
 > Sent from: http://apache-ignite-users.70518.x6.nabble.com/>
 >