Elaborate time to live and max idle in documentation

Abierto
#507 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
55/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Comienza con la documentación de la API Map.put del cliente de Python enlazada en el issue y revisa las descripciones existentes de ttl y max_idle. Usa como referencias la redacción de la API de Node.js y la documentación enlazada sobre la configuración del mapa; se considera terminado cuando la documentación de Python explique cuándo se restablece cada valor y cómo se comportan cero o los valores predeterminados de la configuración.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Type: Documentation

Right now in python client docs we say this about ttl and max idle:

ttl (int) – Maximum time in seconds for this entry to stay in the map. If not provided, the value configured on the server side configuration will be used. Setting this to 0 means infinite time-to-live.

max_idle (int) – Maximum time in seconds for this entry to stay idle in the map. If not provided, the value configured on the server side configuration will be used. Setting this to 0 means infinite max idle time.

as can be found here:

https://hazelcast.readthedocs.io/en/stable/api/proxy/map.html?highlight=map#hazelcast.proxy.map.Map.put

A community user asked this in slack:

Hi, Can any one tell me if it possible to update a map and keep the original TTL that was set when it was created?

I understood it as he is asking if he can reset ttl to its first value when updating an entry, but it is the default behaviour already. See this section: https://docs.hazelcast.com/cloud/map-configurations.html#time-to-live

In Node.js client we have this explanation in the apidocs:

The entry will expire and get evicted after the TTL. It limits the lifetime of the entries relative to the time of the last write access performed on them. If the TTL is 0, then the entry lives forever. If the TTL is negative, then the TTL from the map configuration will be used (default: forever).

The entry will expire and get evicted after the Max Idle time. It limits the lifetime of the entries relative to the time of the last read or write access performed on them. If the Max Idle is 0, then the entry lives forever. If the Max Idle is negative, then the Max Idle from the map configuration will be used (default: forever). The time precision is limited by 1 second. The Max Idle that is less than 1 second can lead to unexpected behaviour.

which explains when ttl and max idle's are reset.

We should have more detail in python version too, at least we should mention when ttl and max idle reset.

Lenguaje dominante
Python
Estrellas
115
Forks
78
Merge medio
2 d 23 h
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de hazelcast/hazelcast-python-client

Todos los issues de hazelcast/hazelcast-python-client

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.