Delete a Key-Value Pair
If a key-value pair is no longer needed, it can be permanently deleted from the cache segment. The key-value pair cannot be restored once it is deleted.
To know more about the component instancecomponent_service and the segment instance segment_service used below, please refer to their respective help sections.
Delete using a Key
You can delete a key-value pair by passing the key name directly as a parameter to the delete() method.
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
key | String | A Mandatory parameter. Will hold the key name of the cache segment. |
copy
#Delete a key-value pair
cache_service = app.cache()
segment_service = cache_service.segment()
segment_service.delete('Name')
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.
Last Updated 2025-03-28 18:24:49 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit