Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed spelling mistakes in documentation and variable names #60

Merged
merged 2 commits into from
Jun 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/CacheManager.Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private static void UpdateTest()
}

cache.Add("test", "start");
Console.WriteLine("Inital value: {0}", cache["test"]);
Console.WriteLine("Initial value: {0}", cache["test"]);

cache.AddOrUpdate("test", "adding again?", v => "updating and not adding");
Console.WriteLine("After AddOrUpdate: {0}", cache["test"]);
Expand Down
18 changes: 9 additions & 9 deletions src/CacheManager.Core/BaseCacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public TCacheValue AddOrUpdate(string key, string region, TCacheValue addValue,
/// The function to perform the update in case the item does already exist.
/// </param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -299,7 +299,7 @@ public TCacheValue AddOrUpdate(string key, TCacheValue addValue, Func<TCacheValu
/// The function to perform the update in case the item does already exist.
/// </param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -362,7 +362,7 @@ public TCacheValue AddOrUpdate(CacheItem<TCacheValue> addItem, Func<TCacheValue,
/// <param name="addItem">The item which should be added or updated.</param>
/// <param name="updateValue">The function to perform the update, if the item does exist.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -622,7 +622,7 @@ public bool TryUpdate(string key, string region, Func<TCacheValue, TCacheValue>
/// <param name="key">The key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>False</c>.
/// </param>
Expand Down Expand Up @@ -663,7 +663,7 @@ public bool TryUpdate(string key, Func<TCacheValue, TCacheValue> updateValue, in
/// <param name="region">The region of the key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>False</c>.
/// </param>
Expand Down Expand Up @@ -766,7 +766,7 @@ public TCacheValue Update(string key, string region, Func<TCacheValue, TCacheVal
/// <param name="key">The key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -804,7 +804,7 @@ public TCacheValue Update(string key, Func<TCacheValue, TCacheValue> updateValue
/// <param name="region">The region of the key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -1614,9 +1614,9 @@ private bool UpdateInternal(
}
else if (result.UpdateState == UpdateItemResultState.TooManyRetries)
{
// only if the item does not exist in the current handle, we procceed the
// only if the item does not exist in the current handle, we proceed the
// loop... otherwise, we had too many retries... this basically indicates an
// invalide state of the cache: The item is there, but we couldn't update it and
// invalid state of the cache: The item is there, but we couldn't update it and
// it most likely has a different version
this.Logger.LogWarn(
"Update: {0} {1}: on handle {2} failed with too many retries! Evicting from other handles...",
Expand Down
22 changes: 11 additions & 11 deletions src/CacheManager.Core/ICacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// The function to perform the update in case the item does already exist.
/// </param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -208,7 +208,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// The function to perform the update in case the item does already exist.
/// </param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -269,7 +269,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// <param name="addItem">The item which should be added or updated.</param>
/// <param name="updateValue">The function to perform the update, if the item does exist.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand All @@ -286,7 +286,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// The method returns either the existing item's value or the newly added <paramref name="value"/>.
/// </summary>
/// <param name="key">The cache key.</param>
/// <param name="value">The value wich should be added.</param>
/// <param name="value">The value which should be added.</param>
/// <returns>Either the added or the existing value.</returns>
/// <exception cref="ArgumentException">
/// If either <paramref name="key"/> or <paramref name="value"/> is null.
Expand All @@ -299,7 +299,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// </summary>
/// <param name="key">The cache key.</param>
/// <param name="region">The cache region.</param>
/// <param name="value">The value wich should be added.</param>
/// <param name="value">The value which should be added.</param>
/// <returns>Either the added or the existing value.</returns>
/// <exception cref="ArgumentException">
/// If either <paramref name="key"/>, <paramref name="region"/> or <paramref name="value"/> is null.
Expand All @@ -311,7 +311,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// The <paramref name="valueFactory"/> will be evaluated only if the item does not exist.
/// </summary>
/// <param name="key">The cache key.</param>
/// <param name="valueFactory">The method which creates the value wich should be added.</param>
/// <param name="valueFactory">The method which creates the value which should be added.</param>
/// <returns>Either the added or the existing value.</returns>
/// <exception cref="ArgumentException">
/// If either <paramref name="key"/> or <paramref name="valueFactory"/> is null.
Expand All @@ -324,7 +324,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// </summary>
/// <param name="key">The cache key.</param>
/// <param name="region">The cache region.</param>
/// <param name="valueFactory">The method which creates the value wich should be added.</param>
/// <param name="valueFactory">The method which creates the value which should be added.</param>
/// <returns>Either the added or the existing value.</returns>
/// <exception cref="ArgumentException">
/// If either <paramref name="key"/> or <paramref name="valueFactory"/> is null.
Expand Down Expand Up @@ -409,7 +409,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// <param name="key">The key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -442,7 +442,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// <param name="region">The region of the key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>Null</c>.
/// </param>
Expand Down Expand Up @@ -528,7 +528,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// <param name="key">The key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>False</c>.
/// </param>
Expand Down Expand Up @@ -562,7 +562,7 @@ public interface ICacheManager<TCacheValue> : ICache<TCacheValue>
/// <param name="region">The region of the key to update.</param>
/// <param name="updateValue">The function to perform the update.</param>
/// <param name="maxRetries">
/// The number of trys which should be performed in case of version conflicts.
/// The number of tries which should be performed in case of version conflicts.
/// If the cache cannot perform an update within the number of <paramref name="maxRetries"/>,
/// this method will return <c>False</c>.
/// </param>
Expand Down
2 changes: 1 addition & 1 deletion src/CacheManager.Core/Internal/ICacheValueSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CacheManager.Core.Internal
/// <summary>
/// Defines the contract for serialization of the cache value and cache items.
/// The cache item serialization should be separated in case the serialization
/// technology does not support immuatble objects; in that case <see cref="CacheItem{T}"/> might not
/// technology does not support immutable objects; in that case <see cref="CacheItem{T}"/> might not
/// be serializable directly and the implementation has to wrap the cache item.
/// </summary>
public interface ICacheSerializer
Expand Down
4 changes: 2 additions & 2 deletions src/CacheManager.Core/Utility/Guard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static ICollection<T> NotNullOrEmpty<T>([ValidatedNotNull]ICollection<T>
}

/// <summary>
/// Validates that <paramref name="value"/> is not null, empty or contains whitespaces only
/// Validates that <paramref name="value"/> is not null, empty or contains whitespace only
/// and otherwise throws an exception.
/// </summary>
/// <param name="value">The parameter value to validate.</param>
Expand All @@ -112,7 +112,7 @@ public static string NotNullOrWhiteSpace([ValidatedNotNull]string value, string
/// Validates that <paramref name="condition"/> is true and otherwise throws an exception.
/// </summary>
/// <param name="condition">The condition to validate.</param>
/// <param name="message">The message to throw if the configurtion is <c>false</c>.</param>
/// <param name="message">The message to throw if the configuration is <c>false</c>.</param>
/// <param name="args"><c>string.Format</c> will be used to format <paramref name="message"/>
/// and <c>args</c> to create the exception message.</param>
/// <returns><c>true</c> if the <paramref name="condition"/> is valid.</returns>
Expand Down
2 changes: 1 addition & 1 deletion src/CacheManager.StackExchange.Redis/RedisCacheHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public override int Count
count += (int)server.DatabaseSize(this.redisConfiguration.Database);
}

// aprox size, only size on the master..
// approx size, only size on the master..
return count;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CacheManager.Redis
/// <connections>
/// <connection id="redis1"
/// database="0"
/// { connnectionString="redis0:6379,redis1:6380,keepAlive=180,allowAdmin=true" }
/// { connectionString="redis0:6379,redis1:6380,keepAlive=180,allowAdmin=true" }
/// OR
/// {
/// allowAdmin="true|false"
Expand Down
2 changes: 1 addition & 1 deletion src/CacheManager.StackExchange.Redis/RetryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static T Retry<T>(Func<T> retryme, int timeOut, int retries, ILogger logg
return retryme();
}

// might occur on lua script excecution on a readonly slave because the master just died.
// might occur on lua script execution on a readonly slave because the master just died.
// Should recover via fail over
catch (StackRedis.RedisServerException ex)
{
Expand Down
20 changes: 10 additions & 10 deletions test/CacheManager.Tests/CacheManagerSimpleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ public void CacheManager_Add_KeyValue_Positive<T>(T value)

[Fact]
[ReplaceCulture]
public void CacheManager_Get_InvalideKey()
public void CacheManager_Get_InvalidKey()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand All @@ -899,7 +899,7 @@ public void CacheManager_Get_InvalideKey()

[Fact]
[ReplaceCulture]
public void CacheManager_Get_InvalideRegion()
public void CacheManager_Get_InvalidRegion()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand All @@ -918,7 +918,7 @@ public void CacheManager_Get_InvalideRegion()

[Fact]
[ReplaceCulture]
public void CacheManager_GetItem_InvalideKey()
public void CacheManager_GetItem_InvalidKey()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand All @@ -941,7 +941,7 @@ public void CacheManager_GetItem_InvalideKey()

[Fact]
[ReplaceCulture]
public void CacheManager_GetItem_InvalideRegion()
public void CacheManager_GetItem_InvalidRegion()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand All @@ -960,7 +960,7 @@ public void CacheManager_GetItem_InvalideRegion()

[Fact]
[ReplaceCulture]
public void CacheManager_GetT_InvalideKey()
public void CacheManager_GetT_InvalidKey()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand All @@ -983,7 +983,7 @@ public void CacheManager_GetT_InvalideKey()

[Fact]
[ReplaceCulture]
public void CacheManager_GetT_InvalideRegion()
public void CacheManager_GetT_InvalidRegion()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand Down Expand Up @@ -1076,7 +1076,7 @@ public void CacheManager_GetCacheItem_Positive()

[Fact]
[ReplaceCulture]
public void CacheManager_Remove_InvalideKey()
public void CacheManager_Remove_InvalidKey()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand All @@ -1099,7 +1099,7 @@ public void CacheManager_Remove_InvalideKey()

[Fact]
[ReplaceCulture]
public void CacheManager_Remove_InvalideRegion()
public void CacheManager_Remove_InvalidRegion()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand Down Expand Up @@ -1209,7 +1209,7 @@ public void CacheManager_Remove_Positive()

[Fact]
[ReplaceCulture]
public void CacheManager_Index_InvalideKey()
public void CacheManager_Index_InvalidKey()
{
// arrange
using (var cache = CacheFactory.Build(settings =>
Expand Down Expand Up @@ -1565,7 +1565,7 @@ public void CacheManager_IsCaseSensitive_Region<T>(T cache)

private static void PopulateCache<T>(ICacheManager<T> cache, IList<string> keys, IList<T> values, int mode)
{
// let us make this safe per run so cache doesn't get cleared/populated from ultiple tests
// let us make this safe per run so cache doesn't get cleared/populated from multiple tests
lock (runLock)
{
foreach (var key in keys)
Expand Down
2 changes: 1 addition & 1 deletion test/CacheManager.Tests/CacheManagerStatsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void CacheManager_Stats_AddGet<T>(T cache)
r1.Should().Be("something");
r2.Should().Be("something");

// each cachhandle stats should have one addCall increase
// each cache handle stats should have one addCall increase
addCalls.ShouldAllBeEquivalentTo(Enumerable.Repeat(1, cache.CacheHandles.Count()));

items.ShouldAllBeEquivalentTo(
Expand Down
Loading