Skip to content

Commit a760d96

Browse files
Valerii MaslenykovValeriyMaslenikov
authored andcommitted
cacheKay -> cacheKey
1 parent 4955bc4 commit a760d96

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Joystick.Client/JoystickClient.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ public void ClearCache()
145145

146146
var contentIds = new[] { contentId };
147147

148-
var cacheKay = CacheHelper.GenerateCacheKey(this.config, settings.IsContentSerialized, contentIds);
149-
var isContainedInCache = this.cacheService.TryGet(cacheKay, out var contentsJson);
148+
var cacheKey = CacheHelper.GenerateCacheKey(this.config, settings.IsContentSerialized, contentIds);
149+
var isContainedInCache = this.cacheService.TryGet(cacheKey, out var contentsJson);
150150

151151
if (!isContainedInCache || settings.Refresh == true)
152152
{
@@ -159,7 +159,7 @@ public void ClearCache()
159159
if (!isContainedInCache || settings.Refresh == true)
160160
{
161161
JsonContentsValidator.Validate(partiallyDeserialized);
162-
this.cacheService.Set(cacheKay, contentsJson);
162+
this.cacheService.Set(cacheKey, contentsJson);
163163
}
164164

165165
return partiallyDeserialized[contentId].ToString();
@@ -178,9 +178,9 @@ public void ClearCache()
178178
throw new JoystickArgumentException($"{nameof(contentIds)} can't contain empty value.");
179179
}
180180

181-
var cacheKay = CacheHelper.GenerateCacheKey(this.config, settings.IsContentSerialized, enumerable);
181+
var cacheKey = CacheHelper.GenerateCacheKey(this.config, settings.IsContentSerialized, enumerable);
182182

183-
if (this.cacheService.TryGet(cacheKay, out var contentsJson) && settings.Refresh != true)
183+
if (this.cacheService.TryGet(cacheKey, out var contentsJson) && settings.Refresh != true)
184184
{
185185
return contentsJson;
186186
}
@@ -192,7 +192,7 @@ public void ClearCache()
192192

193193
JsonContentsValidator.Validate(partiallyDeserialized);
194194

195-
this.cacheService.Set(cacheKay, contentsJson);
195+
this.cacheService.Set(cacheKey, contentsJson);
196196

197197
return contentsJson;
198198
}

tests/Joystick.UnitTests/Utils/CacheHelperTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ public void BuildStringCacheKey_Should_ReturnCorrectString()
168168
var isContentSerialized = true;
169169
var contentIds = new[] { "Auth", "Design" };
170170

171-
var actualCacheKay = CacheHelper.BuildStringCacheKey(config, isContentSerialized, contentIds);
171+
var actualCacheKey = CacheHelper.BuildStringCacheKey(config, isContentSerialized, contentIds);
172172

173-
Assert.Equal(expectedCacheKey, actualCacheKay);
173+
Assert.Equal(expectedCacheKey, actualCacheKey);
174174
}
175175
}
176176
}

0 commit comments

Comments
 (0)