store_bytes


Description:

public bool store_bytes (StoreMode mode, string key, uint8[] value, time_t expires = -1)

Store a byte array value in the bucket.

Example:

  // Add a new key
var success = client.store_bytes( StoreMode.ADD, "my-key", "example".data );
if (success) {
// This will fail
success = client.store_bytes( StoreMode.ADD, "my-key", "example2".data );
}
// Add a key with expiration 30 seconds from now
success = client.store_bytes( StoreMode.ADD, "my-expiring", "example".data, ( time() + 30 ) );

Parameters:

mode The StoreMode for this action: ADD, REPLACE, or SET
key The key
value The value
expires Optionally, the unix timestamp when the key expires

Returns:

true if the key/value pair was stored successfully