CouchbaseBucket GetDocument() returns the IDocumentResult object which contains a CouchbaseDocument.Document object. The uint Expiry property is always zero and not what is actually set in couchbase.
Here is a quick sample code which should show the problem.
var response = Bucket.Upsert(storageLocation, buffer, TimeSpan.FromDays(30)); var downloadedCBFile = CouchbaseIndexContent.Bucket.GetDocument<byte[]>(storageLocation); Assert.IsTrue(downloadedCBFile.Document.Expiry > 0);