Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 7db7590

Browse files
authored
Merge pull request #17 from launchdarkly/eb/ch110125/fix-inited-key-v1
2 parents 2982571 + e461336 commit 7db7590

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.ldrelease/config.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
publications:
2+
- url: https://nuget.org/packages/LaunchDarkly.ServerSdk.Redis
3+
description: NuGet
4+
5+
releasableBranches:
6+
- name: master
7+
description: 2.x - for SDK 5.x + StackExchange.Redis 2.x
8+
- name: 1.x
9+
description: for SDK 5.x + StackExchange.Redis 1.x
10+
11+
circleci:
12+
windows:
13+
context: org-global
14+
env:
15+
LD_RELEASE_DOCS_TARGET_FRAMEWORK: net45
16+
17+
template:
18+
name: dotnet-windows
19+
skip:
20+
- test # tests require Redis - run them only in CI
21+
22+
documentation:
23+
title: LaunchDarkly .NET SDK Redis Integration
24+
githubPages: true

src/LaunchDarkly.ServerSdk.Redis/RedisFeatureStore.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ internal sealed class RedisFeatureStoreCore : IFeatureStoreCore
1313

1414
private readonly ConnectionMultiplexer _redis;
1515
private readonly string _prefix;
16+
private readonly string _initedKey;
1617

1718
// This is used for unit testing only
1819
private Action _updateHook;
@@ -30,12 +31,13 @@ Action updateHook
3031

3132
_prefix = prefix;
3233
_updateHook = updateHook;
34+
_initedKey = prefix + ":$inited";
3335
}
3436

3537
public bool InitializedInternal()
3638
{
3739
IDatabase db = _redis.GetDatabase();
38-
return db.KeyExists(_prefix);
40+
return db.KeyExists(_initedKey);
3941
}
4042

4143
public void InitInternal(IDictionary<IVersionedDataKind, IDictionary<string, IVersionedData>> items)
@@ -54,7 +56,7 @@ public void InitInternal(IDictionary<IVersionedDataKind, IDictionary<string, IVe
5456
// transaction. We don't need to await them.
5557
}
5658
}
57-
txn.StringSetAsync(_prefix, "");
59+
txn.StringSetAsync(_initedKey, "");
5860
txn.Execute();
5961
}
6062

0 commit comments

Comments
 (0)