If the key is open for writing, unlink it (that is delete it in a * non-blocking way, not reclaiming memory immediately) and setup the key to * accept new writes as an empty key (that will be created on demand). * On success REDISMODULE_OK is returned. If the key is not open for * writing REDISMODULE_ERR is returned. */
| 2431 | * On success REDISMODULE_OK is returned. If the key is not open for |
| 2432 | * writing REDISMODULE_ERR is returned. */ |
| 2433 | int RM_UnlinkKey(RedisModuleKey *key) { |
| 2434 | if (!(key->mode & REDISMODULE_WRITE)) return REDISMODULE_ERR; |
| 2435 | if (key->value) { |
| 2436 | dbAsyncDelete(key->db,key->key); |
| 2437 | key->value = NULL; |
| 2438 | } |
| 2439 | return REDISMODULE_OK; |
| 2440 | } |
| 2441 | |
| 2442 | /* Return the key expire value, as milliseconds of remaining TTL. |
| 2443 | * If no TTL is associated with the key or if the key is empty, |
nothing calls this directly
no test coverage detected