Search:

Search all manuals
Search this manual
Manual
Couchbase Developer's Guide 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
4.1 About Keys, Values and Meta-data
Chapter Sections
Chapters

4.1.4. Understanding Expiration

Time to live can be a bit confusing for developers at first. There are many cases where you may set an expiration to be 30 seconds, but the record may actually still exist on disk after expiration.

There are two ways that Couchbase Server will remove items flagged for deletion:

When Couchbase Server performs lazy deletion, it flags an item as deleted when the server receives a delete request; later when a client tries to retrieve the item, Couchbase Server will return a message that the key does not exist and actually delete the item. Items that are flagged as expired will be removed every 60 minutes by default by an automatic maintenance process. To update the interval for this maintenance, you would set exp_pager_stime:

./cbconfig localhost:11210 set flush exp_pager_stime 7200

This updates the maintenance program so that it runs every two hours on the default bucket.