Fastly Compute C++ SDK
Loading...
Searching...
No Matches
fastly::kv_store::InsertBuilder Class Reference

#include <kv_store.h>

Public Member Functions

InsertBuilder mode (InsertMode mode) &&
 Change the behavior in the case when the new key matches an existing key.
InsertBuilder background_fetch () &&
InsertBuilder if_generation_match (std::uint64_t gen) &&
InsertBuilder metadata (const std::string &data) &&
 Sets an arbitrary data field which can contain up to 2000B of data.
InsertBuilder time_to_live (std::chrono::milliseconds ttl) &&
expected execute (const std::string &key, Body body) &&
expected< PendingInsertHandleexecute_async (const std::string &key, Body body) &&
 Initiate async insert of a value into the KV Store.

Friends

class KVStore

Member Function Documentation

◆ background_fetch()

InsertBuilder fastly::kv_store::InsertBuilder::background_fetch ( ) &&

If set, allows fetching from the origin to occur in the background, enabling a faster response with stale content. The cache will be updated with fresh content after the request is completed.

◆ execute()

expected fastly::kv_store::InsertBuilder::execute ( const std::string & key,
Body body ) &&

Initiate and wait on an insert of a value into the KV Store. The return object is engaged if the value was inserted, and KVStoreError if the insert failed.

◆ execute_async()

expected< PendingInsertHandle > fastly::kv_store::InsertBuilder::execute_async ( const std::string & key,
Body body ) &&

Initiate async insert of a value into the KV Store.

◆ if_generation_match()

InsertBuilder fastly::kv_store::InsertBuilder::if_generation_match ( std::uint64_t gen) &&

Requests for keys will return a ‘generation’ header specific to the version of a key. The generation header is a unique, non-serial 64-bit unsigned integer that can be used for testing against a specific KV store value.

◆ metadata()

InsertBuilder fastly::kv_store::InsertBuilder::metadata ( const std::string & data) &&

Sets an arbitrary data field which can contain up to 2000B of data.

◆ mode()

InsertBuilder fastly::kv_store::InsertBuilder::mode ( InsertMode mode) &&

Change the behavior in the case when the new key matches an existing key.

◆ time_to_live()

InsertBuilder fastly::kv_store::InsertBuilder::time_to_live ( std::chrono::milliseconds ttl) &&

Sets a time for the key to expire. Deletion will take place up to 24 hours after the ttl reaches 0.

◆ KVStore

friend class KVStore
friend

The documentation for this class was generated from the following file: