Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Is it possible to set a TTL expiration on keys added to redis? #107

@HoukasaurusRex

Description

@HoukasaurusRex

I use this module to stream IoT data to a real-time monitoring application. The storage size of the data grows exponentially with the amount of connected devices, so it's important to use a strategy of evicting keys once storage is full. I know for redis cli and some redis modules, I can set a TTL on keys using an expire attribute or something similar depending on the module, but I haven't found anything like that in the redistimeseries documentation.

Something like this is what I'm wondering is possible with this module:

from redistimeseries.client import Client
rts = Client()
rts.create('expire-soon-test', labels={'Time':'Series'})
rts.add('expire-soon-test', 1, 1.12, expire=10)

What's the best way to attach a TTL to the timeseries data streamed to redis using redistimeseries?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions