Questions tagged [ttl]

Time to live (TTL) is a mechanism that limits the lifespan or lifetime of data in a computer or network

Time to live (TTL) is a mechanism that limits the lifespan or lifetime of data in a computer or network

Wikipedia

598 questions
189
votes
3 answers

Is there a way to set an "expiry" time, after which a data entry is automatically deleted in PostgreSQL?

Is there any way to set some sort of "expiry" time on data entries in PostgreSQL? I'm thinking about something equivalent to EXPIRE in Redis. I'm not looking to store a timestamp and then manually code some sort of cron job to check what entries…
Pensierinmusica
  • 6,404
  • 9
  • 40
  • 58
84
votes
3 answers

TTL for a set member

Is it possible in Redis to set TTL (time to live) not for a specific key, but for a member for a set? I am using a structure for tags proposed by Redis documentation - the data are simple key-value pairs, and the tags are sets containing keys…
Przemek
  • 6,300
  • 12
  • 44
  • 61
54
votes
5 answers

Redis Multi-Set With a TTL

In redis there is a SETEX command that allows me to set a key that expires, is there a multi-set version of this command that also has a TTL? both MSET and MSETNX commands do not have such an option.
Ian
  • 24,116
  • 22
  • 58
  • 96
47
votes
4 answers

Redis store key without a value

When using the Redis expire commands like SETEX and TTL, there are scenarios in which there is no need for the key to hold a value at all, because the time to live acts as such. However, Redis requires any key to have a value. What would be the most…
RienNeVaPlu͢s
  • 7,442
  • 6
  • 43
  • 77
40
votes
3 answers

What's default TTL in Redis?

I can't find anywhere online what is default TTL in Redis. I know that I can set TTL for specific SET, but don't know what is default TTL. Can someone tell me what default time to live is in Redis?
Vedran Juriša
  • 423
  • 1
  • 4
  • 8
20
votes
1 answer

Can individual fields be set to expire in MongoDB?

I would like to know if it is possible to expire individual fields in a document rather than the entire document. Having read the documentation on TTL Indexes and Expiring Data, it would appear that it is only possible to expire documents based on a…
aerospatiale
  • 265
  • 2
  • 12
19
votes
3 answers

Map with TTL option in Go

I need to build a data-structure like this: map[string]SomeType But it must store values for about 10 minutes and then clear it from memory. Second condition is records amount - it must be huge. This data-structure must add at least 2-5K records…
matvey.co
  • 381
  • 1
  • 4
  • 9
19
votes
1 answer

my redis keys do not expire

My redis server does not delete keys when the time-to-live reaches 0. Here is a sample code: redis-cli >SET mykey "ismykey" >EXPIRE mykey 20 #check TTL >TTL mykey >(integer) 17 > ... >TTL mykey >(integer) -1 #mykey chould have expired: >EXISTS…
user1151446
  • 1,845
  • 3
  • 15
  • 22
18
votes
1 answer

How long the connection will be kept alive in Http/2?

How long the connection will be kept alive in Http/2? I understand the Http/2 uses one connection per domain and does multiplexing. But I didn't get any information on how long the connection will be kept alive.
Navin GV
  • 700
  • 3
  • 10
  • 24
18
votes
2 answers

CQL3: How to retrieve the TTL when there is only a primary key?

I have a CQL table defined like this: CREATE table primary_key_only( row_key varchar, clustered_key varchar, primary key(row_key, clustered_key) ) Assuming I insert values like this: INSERT INTO primary_key_only (row_key, clustered_key)…
Peter
  • 6,354
  • 1
  • 31
  • 29
17
votes
1 answer

MongoDb TTL on nested document is possible?

I want to know if it's possible to use TTL on nested documents. Scenario I have Account and inside I have Sessions. Sessions need to expire in 30 minutes. I've set everything up but obviously when I set TTL index on Account.Sessions.EndDateTime it…
Stan
  • 25,744
  • 53
  • 164
  • 242
17
votes
3 answers

Create Cassandra table using cql3 with default TTL

Is it possible to create a table that has a default TTL for all rows that are inserted into it, or do you have to always remember to set the TTL when you do an insert/update? Cant see anything on this in the…
Ziklag
  • 251
  • 1
  • 2
  • 6
16
votes
3 answers

Cassandra ttl on a row

I know that there are TTLs on columns in Cassandra. But is it also possible to set a TTL on a row? Setting a TTL on each column doesn't solve my problem as can be seen in the following usecase: At some point a process wants to delete a complete row…
snd
  • 195
  • 1
  • 1
  • 6
15
votes
4 answers

How to receive Redis expire events with node?

I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber =…
emilioriosvz
  • 1,629
  • 1
  • 19
  • 30
12
votes
1 answer

Messages with expiration are not removed from RabbitMQ

I am sending a normal message through a producer to RabbitMQ and then I send a second message with the expiration attribute assigned to a value. Then using the rabbitmqctl list_queues command I monitor the status of the messages. I found that if I…
Anastasios Andronidis
  • 6,310
  • 4
  • 30
  • 53
1
2 3
39 40