# Kv\_store ## **Overview** Provides functions for obtaining, setting, and deleting a key-value pair. Key-value pairs can be permanently stored in the file system. If [FEATURE\_KV\_CACHE](utils_config.md#gad3d71669516ef0bb50e2b105507a6b29) is enabled, key-value pairs can be stored in the cache. For details about cache specifications, see [MAX\_CACHE\_SIZE](utils_config.md#ga6c8469dfe973ac952cf40394bd2c160b). For details about the number of key-value pairs that can be stored in an application, see [MAX\_KV\_SUM](utils_config.md#ga4f258bd7d7d52c6770cce77f3e16ce72). **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Files
Provides functions for obtaining, setting, and deleting a key-value pair. |
UtilsGetValue (const char *key, char *value, unsigned int len) |
Obtains the value matching a specified key from the file system or cache. |
UtilsSetValue (const char *key, const char *value) |
Adds or updates the value matching a specified key in the file system or cache. |
UtilsDeleteValue (const char *key) |
Deletes the value matching a specified key from the file system or cache. |
ClearKVCache (void) |
key | Indicates the key whose value is to be deleted. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string). |
key | Indicates the key to be indexed. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string). |
value | Indicates the buffer for storing the value that matches the key. This is an output parameter. |
len | Indicates the size of the value space in the buffer. |
key | Indicates the key whose value is to be added or updated. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string). |
value | Indicates the value to be added or updated. Its length cannot exceed 128 bytes (including the end-of-text character in the string). |