Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Couchbase expiration policy

5 replies [Last post]
  • Login or register to post comments
Wed, 10/31/2012 - 11:03
LubosSykora
Offline
Joined: 09/05/2012
Groups: None

hi,

i'm using .net client 1.2 beta against 2.0 dev prev 4 version of couchbase.
what i don't understand is the expiration behavior - when i set expiration time when storing the item in db to be one minute and check number of items in the monitoring console, i see that items never gets removed...

_client.Store(StoreMode.Add, "testSpan", "testSpan", TimeSpan.FromMinutes(1));

what's going wrong there, or did i miss anything?

Lubos

Top
  • Login or register to post comments
Mon, 11/05/2012 - 00:13
ingenthr
Offline
Joined: 03/16/2010
Groups:

The removal of expired documents happens either when you try to access the document or when a background job runs, so seeing docs appear there for some time is normal. This allows the server to be much more efficient.

Top
  • Login or register to post comments
Mon, 11/05/2012 - 00:35
Lubos
Offline
Joined: 09/03/2012
Groups: None

thanks for explanation!
what is then the time span in which the job is triggered?
and what is then the accuracy of the expiration? i mean if i set it to be 12:00 - and then access it at 12:05, will i get nothing?

Top
  • Login or register to post comments
Wed, 11/07/2012 - 02:01
daschl
Offline
Joined: 05/19/2012
Groups: None

To my knowledge the background job runs every hour.

Here is the info on expiration from the docs:
Expiration times are expressed in seconds. If the value is less than 30 days (30*24*60*60), the expiration is the number of seconds until the value expires. A number higher than this indicates an absolute expiration based on the number of seconds since the epoch.

Top
  • Login or register to post comments
Wed, 11/07/2012 - 02:13
Lubos
Offline
Joined: 09/03/2012
Groups: None

hi, thanks!

Top
  • Login or register to post comments
Tue, 11/13/2012 - 08:27
bartolomeo.romano
Offline
Joined: 01/24/2012
Groups: None

Hi guys,

What would happen if I passed a <= 0 expiry value?

Thanks,
Bart

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker