MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / Cache_SetValue

Function Cache_SetValue

src/util/cache/cache.c:106–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void Cache_SetValue(Cache *cache, const char *key, void *value) {
107 ASSERT(key != NULL);
108 ASSERT(cache != NULL);
109
110 size_t key_len = strlen(key);
111
112 // Acquire WRITE lock
113 int res = pthread_rwlock_wrlock(&cache->_cache_rwlock);
114 UNUSED(res);
115 ASSERT(res == 0);
116
117 // Insert the value to the cache.
118 _Cache_SetValue(cache, key, value, key_len);
119
120 res = pthread_rwlock_unlock(&cache->_cache_rwlock);
121 ASSERT(res == 0);
122}
123
124void *Cache_SetGetValue(Cache *cache, const char *key, void *value) {
125 ASSERT(key != NULL);

Callers 1

test_executionPlanCacheFunction · 0.85

Calls 1

_Cache_SetValueFunction · 0.85

Tested by 1

test_executionPlanCacheFunction · 0.68