Does CouchDB have Redis expiration equivalent?

Does CouchDB have an expiration equivalent like in Redis?

Example for Redis expire:

#!/usr/bin/env python
import redis
redis_server = redis.Redis(host='localhost',port=5477,db=0)
r.set('cat','meow')
r.expire('cat',10)
# do some work and ten seconds later...
r.get('cat') # returns None
+5
source share
3 answers

No. CouchDB does not have this.

Redistakes a lazy approach and removes keys when they are checked, even if they may have expired much earlier. Additionally, as @antirez noted, Redis will delete a random set of expired keys every second or so to control the size of the database.

CouchDB , . , , . , . , ( ), .

+7

. memcache/redis. CouchDB - db .

+2

! "", mu.

CouchDB expires_at (). , . , , . .

To do this, you need to synchronize the hours of the clients. If you have one central, authoritative server (a very common situation), an easy way to synchronize is with clients for the ping-couch and HTTP header verification Date.

+2
source

All Articles