Replaces a document for a given key if it exists, otherwise fails.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)

Parameters
- key
- Type: System.String
The unique key for indexing.
- value
- Type: T
The value for the key.
- cas
- Type: System.UInt64
The CAS (Check and Set) value for optimistic concurrency.
- expiration
- Type: System.UInt32
The time-to-live (ttl) for the key in seconds.
- replicateTo
- Type: Couchbase.ReplicateTo
The durability requirement for replication.
- persistTo
- Type: Couchbase.PersistTo
The durability requirement for persistence.

- T
- The Type of the value to be inserted.
Return Value
Type: IOperationResult<T>An object implementing the IOperationResult<T>interface.
Implements
IBucket.Replace<T>(String, T, UInt64, UInt32, ReplicateTo, PersistTo)
Expirations over 30 * 24 * 60 * 60 (the amount of seconds in 30 days) are interpreted as a UNIX timestamp of the date at which the document expires.
see documentation section about expiration.
