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

fix typo #320

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions samples/AspnetCore.WebApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public void ConfigureServices(IServiceCollection services)
// TODO: still not 100% happy with the logging part
services.AddCacheManagerConfiguration(Configuration, cfg => cfg.WithMicrosoftLogging(services));

// uses a refined configurastion (this will not log, as we added the MS Logger only to the configuration above
// uses a refined configuration (this will not log, as we added the MS Logger only to the configuration above
services.AddCacheManager<int>(Configuration, configure: builder => builder.WithJsonSerializer());

// creates a completely new configuration for this instance (also not logging)
services.AddCacheManager<DateTime>(inline => inline.WithDictionaryHandle());

// any other type will be this. Configurastion used will be the one defined by AddCacheManagerConfiguration earlier.
// any other type will be this. Configuration used will be the one defined by AddCacheManagerConfiguration earlier.
services.AddCacheManager();
}

Expand Down
2 changes: 1 addition & 1 deletion src/CacheManager.Core/BaseCacheManager.Update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private bool UpdateInternal(
}

// lowest level
// todo: maybe check for only run on the backplate if configured (could potentially be not the last one).
// todo: maybe check for only run on the backplane if configured (could potentially be not the last one).
var handleIndex = handles.Length - 1;
var handle = handles[handleIndex];

Expand Down
14 changes: 7 additions & 7 deletions src/CacheManager.Core/BaseCacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private BaseCacheManager(string name, ICacheManagerConfiguration configuration)
handle.OnCacheSpecificRemove += (sender, args) =>
{
// added sync for using backplane with in-memory caches on cache specific removal
// but commented for now, this is not really needed if all instances use the same expiration etc, would just cause dublicated events
// but commented for now, this is not really needed if all instances use the same expiration etc, would just cause duplicated events
////if (_cacheBackplane != null && handle.Configuration.IsBackplaneSource && !handle.IsDistributedCache)
////{
//// if (string.IsNullOrEmpty(args.Region))
Expand All @@ -111,7 +111,7 @@ private BaseCacheManager(string name, ICacheManagerConfiguration configuration)
EvictFromHandlesAbove(args.Key, args.Region, handleIndex);
}

// moving down below cleanup, optherwise the item could still be in memory
// moving down below cleanup, otherwise the item could still be in memory
TriggerOnRemoveByHandle(args.Key, args.Region, args.Reason, handleIndex + 1, args.Value);
};

Expand Down Expand Up @@ -719,16 +719,16 @@ private void RegisterCacheBackplane(CacheBackplane backplane)
if (_cacheHandles.Any(p => p.Configuration.IsBackplaneSource))
{
// added includeSource param to get the handles which need to be synced.
// in case the backplane source is non-distributed (in-memory), only remotly triggered remove and clear should also
// trigger a sync locally. For distribtued caches, we expect that the distributed cache is already the source and in sync
// as that's the layer which triggered the event. In this case, only other in-memory handles above the distribtued, would be synced.
var handles = new Func<bool, BaseCacheHandle<TCacheValue>[]>((includSource) =>
// in case the backplane source is non-distributed (in-memory), only remotely triggered remove and clear should also
// trigger a sync locally. For distributed caches, we expect that the distributed cache is already the source and in sync
// as that's the layer which triggered the event. In this case, only other in-memory handles above the distributed, would be synced.
var handles = new Func<bool, BaseCacheHandle<TCacheValue>[]>((includeSource) =>
{
var handleList = new List<BaseCacheHandle<TCacheValue>>();
foreach (var handle in _cacheHandles)
{
if (!handle.Configuration.IsBackplaneSource ||
(includSource && handle.Configuration.IsBackplaneSource && !handle.IsDistributedCache))
(includeSource && handle.Configuration.IsBackplaneSource && !handle.IsDistributedCache))
{
handleList.Add(handle);
}
Expand Down
4 changes: 2 additions & 2 deletions src/CacheManager.Core/ExpirationMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public enum ExpirationMode
{
/// <summary>
/// Default value for the expircation mode enum.
/// Default value for the expiration mode enum.
/// CacheManager will default to <c>None</c>. The <code>Default</code> entry in the enum is used as separation from the other values
/// and to make it possible to explicitly set the expiration to <c>None</c>.
/// </summary>
Expand All @@ -28,4 +28,4 @@ public enum ExpirationMode
/// </summary>
Absolute = 3
}
}
}
4 changes: 2 additions & 2 deletions src/CacheManager.Core/ICacheManagerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace CacheManager.Core
{
/// <summary>
/// The writable configuration contract used primarrily internal only
/// The writable configuration contract used primarily internal only
/// </summary>
public interface ICacheManagerConfiguration : IReadOnlyCacheManagerConfiguration
{
Expand Down Expand Up @@ -119,4 +119,4 @@ public interface IReadOnlyCacheManagerConfiguration
/// <see cref="UpdateMode"/>
CacheUpdateMode UpdateMode { get; }
}
}
}
4 changes: 2 additions & 2 deletions src/CacheManager.Core/Internal/BackplaneMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public byte[] ReadBytes(int length)
throw new IndexOutOfRangeException("Cannot read bytes, no additional bytes available.");
}

// fix: length check before aloc
// fix: length check before alloc
var result = new byte[length];
Buffer.BlockCopy(_data, pos - length, result, 0, length);
return result;
Expand All @@ -553,4 +553,4 @@ public string ReadString()
}
}
}
}
}
4 changes: 2 additions & 2 deletions src/CacheManager.Core/Internal/BaseCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ protected void CheckDisposed()
/// </summary>
/// <typeparam name="TOut">The type.</typeparam>
/// <param name="value">The value.</param>
/// <returns>The casted value.</returns>
/// <returns>The cast value.</returns>
protected static TOut GetCasted<TOut>(object value)
{
if (value == null)
Expand All @@ -514,4 +514,4 @@ protected static TOut GetCasted<TOut>(object value)
}
}
}
}
}
14 changes: 7 additions & 7 deletions src/CacheManager.Core/Internal/CacheEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public CacheActionEventArgs(string key, string region)
/// </summary>
/// <param name="key">The key.</param>
/// <param name="region">The region.</param>
/// <param name="origin">The origin the event ocured. If remote, the event got triggered by the backplane and was not actually excecuted locally.</param>
/// <param name="origin">The origin the event occured. If remote, the event got triggered by the backplane and was not actually executed locally.</param>
/// <exception cref="System.ArgumentNullException">If key is null.</exception>
public CacheActionEventArgs(string key, string region, CacheActionEventArgOrigin origin)
: this(key, region)
Expand All @@ -153,7 +153,7 @@ public CacheActionEventArgs(string key, string region, CacheActionEventArgOrigin
public string Region { get; }

/// <summary>
/// Gets the event origin indicating if the event was triggered by a local action or remotly, through the backplane.
/// Gets the event origin indicating if the event was triggered by a local action or remotely, through the backplane.
/// </summary>
public CacheActionEventArgOrigin Origin { get; } = CacheActionEventArgOrigin.Local;

Expand All @@ -172,14 +172,14 @@ public sealed class CacheClearEventArgs : EventArgs
/// <summary>
/// Initializes a new instance of the <see cref="CacheClearEventArgs"/> class.
/// </summary>
/// <param name="origin">The origin the event ocured. If remote, the event got triggered by the backplane and was not actually excecuted locally.</param>
/// <param name="origin">The origin the event occured. If remote, the event got triggered by the backplane and was not actually executed locally.</param>
public CacheClearEventArgs(CacheActionEventArgOrigin origin = CacheActionEventArgOrigin.Local)
{
Origin = origin;
}

/// <summary>
/// Gets the event origin indicating if the event was triggered by a local action or remotly, through the backplane.
/// Gets the event origin indicating if the event was triggered by a local action or remotely, through the backplane.
/// </summary>
public CacheActionEventArgOrigin Origin { get; }

Expand All @@ -199,7 +199,7 @@ public sealed class CacheClearRegionEventArgs : EventArgs
/// Initializes a new instance of the <see cref="CacheClearRegionEventArgs"/> class.
/// </summary>
/// <param name="region">The region.</param>
/// <param name="origin">The origin the event ocured. If remote, the event got triggered by the backplane and was not actually excecuted locally.</param>
/// <param name="origin">The origin the event occured. If remote, the event got triggered by the backplane and was not actually excecuted locally.</param>
/// <exception cref="System.ArgumentNullException">If region is null.</exception>
public CacheClearRegionEventArgs(string region, CacheActionEventArgOrigin origin = CacheActionEventArgOrigin.Local)
{
Expand All @@ -216,7 +216,7 @@ public CacheClearRegionEventArgs(string region, CacheActionEventArgOrigin origin
public string Region { get; }

/// <summary>
/// Gets the event origin indicating if the event was triggered by a local action or remotly, through the backplane.
/// Gets the event origin indicating if the event was triggered by a local action or remotely, through the backplane.
/// </summary>
public CacheActionEventArgOrigin Origin { get; }

Expand All @@ -226,4 +226,4 @@ public override string ToString()
return $"CacheClearRegionEventArgs {Region} - {Origin}";
}
}
}
}
4 changes: 2 additions & 2 deletions src/CacheManager.Core/Internal/SerializerCacheItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public interface ICacheItemConverter
{
/// <summary>
/// Converts the current instance to a <see cref="CacheItem{T}"/>.
/// The returned item must return the orignial created and last accessed date!
/// The returned item must return the original created and last accessed date!
/// </summary>
/// <typeparam name="TTarget">The type.</typeparam>
/// <returns>The cache item.</returns>
Expand Down Expand Up @@ -73,7 +73,7 @@ public SerializerCacheItem(ICacheItemProperties properties, object value)

/// <summary>
/// Gets or sets the expiration timeout in milliseconds.
/// Can be coverted from and to <see cref="TimeSpan"/>.
/// Can be converted from and to <see cref="TimeSpan"/>.
/// </summary>
[DataMember]
public abstract double ExpirationTimeout { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/CacheManager.Couchbase/CouchbaseConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace CacheManager.Couchbase
/// Manages configurations for the couchbase cache handle.
/// <para>
/// As of version 1.0.2, changed the management of <see cref="IBucket"/>s as those instances are already
/// managed by the <see cref="IClusterController"/> of the couchbase client libraray. No need to have additional collections of stuff in here.
/// managed by the <see cref="IClusterController"/> of the couchbase client library. No need to have additional collections of stuff in here.
/// </para>
/// <para>
/// We keep track of added configurations via <see cref="CouchbaseConfigurationBuilderExtensions.WithCouchbaseConfiguration(ConfigurationBuilderCachePart, string, ClientConfiguration)"/>
Expand Down Expand Up @@ -205,4 +205,4 @@ private static IBucket GetBucket(string configurationKey, string bucketName, str
return string.IsNullOrEmpty(bucketPassword) ? cluster.OpenBucket(bucketName) : cluster.OpenBucket(bucketName, bucketPassword);
}
}
}
}
4 changes: 2 additions & 2 deletions src/CacheManager.Memcached/MemcachedCacheHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ protected override bool RemoveInternal(string key, string region)
/// </remarks>
/// <param name="mode">The mode.</param>
/// <param name="item">The item.</param>
/// <param name="shouldRetry">Flag indicating if the operation should be retried. Returnd succssess code will be false anyways.</param>
/// <param name="shouldRetry">Flag indicating if the operation should be retried. Returned success code will be false anyways.</param>
/// <returns>The result.</returns>
protected virtual IStoreOperationResult Store(StoreMode mode, CacheItem<TCacheValue> item, out bool shouldRetry)
{
Expand Down Expand Up @@ -767,4 +767,4 @@ protected override ArraySegment<byte> SerializeObject(object value)
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class MicrosoftLoggingBuilderExtensions
/// Enables logging for the cache manager instance.
/// Using this extension will create a NEW instance of <c>Microsoft.Extensions.Logging.ILoggerFactory</c>.
/// <para>
/// If you use the standard Micorosft AspNetCore DI, you might want to use the other extensions which make CacheManager use
/// If you use the standard Microsoft AspNetCore DI, you might want to use the other extensions which make CacheManager use
/// the already injected/shared instance of <see cref="Microsoft.Extensions.Logging.ILoggerFactory"/>.
/// </para>
/// <para>
Expand All @@ -37,7 +37,7 @@ public static ConfigurationBuilderCachePart WithMicrosoftLogging(this Configurat
}

/// <summary>
/// Enables logging for the cache manager instance using an existion <c>Microsoft.Extensions.Logging.ILoggerFactory</c> as target.
/// Enables logging for the cache manager instance using an existing <c>Microsoft.Extensions.Logging.ILoggerFactory</c> as target.
/// </summary>
/// <param name="part">The builder part.</param>
/// <param name="loggerFactory">The logger factory which should be used.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CacheManager.Serialization.DataContract
{
/// <summary>
/// The data contract cache item will be used to serialize a <see cref="CacheItem{T}"/>.
/// A <see cref="CacheItem{T}"/> cannot be derserialized by DataContractSerializer because of the private setters.
/// A <see cref="CacheItem{T}"/> cannot be deserialized by DataContractSerializer because of the private setters.
/// </summary>
[DataContract]
internal class DataContractCacheItem<T> : SerializerCacheItem<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace CacheManager.Serialization.Json
{
/// <summary>
/// Implements the <c>ICacheSerializer</c> contract using <c>Newtonsoft.Json</c> and the <see cref="GZipStream "/> loseless compression.
/// Implements the <c>ICacheSerializer</c> contract using <c>Newtonsoft.Json</c> and the <see cref="GZipStream "/> lossless compression.
/// </summary>
public class GzJsonCacheSerializer : JsonCacheSerializer
{
Expand Down
4 changes: 2 additions & 2 deletions src/CacheManager.StackExchange.Redis/RedisCacheBackplane.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public RedisCacheBackplane(ICacheManagerConfiguration configuration, ILoggerFact
RetryHelper.Retry(() => Subscribe(), configuration.RetryTimeout, configuration.MaxRetries, _logger);

// adding additional timer based send message invoke (shouldn't do anything if there are no messages,
// but in really rare race conditions, it might happen messages do not get send if SendMEssages only get invoked through "NotifyXyz"
// but in really rare race conditions, it might happen messages do not get send if SendMessages only get invoked through "NotifyXyz"
_timer = new Timer(SendMessages, true, 1000, 1000);
}

Expand Down Expand Up @@ -233,7 +233,7 @@ private void SendMessages(object state)
// clearing up only after successfully sending. Basically retrying...
_messages.Clear();

// reset log limmiter because we just send stuff
// reset log limiter because we just send stuff
loggedLimitWarningOnce = false;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/CacheManager.StackExchange.Redis/RedisCacheHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public RedisCacheHandle(ICacheManagerConfiguration managerConfiguration, CacheHa
if (_redisConfiguration.KeyspaceNotificationsEnabled)
{
// notify-keyspace-events needs to be set to "Exe" at least! Otherwise we will not receive any events.
// this must be configured per server and should probably not be done automagically as this needs admin rights!
// this must be configured per server and should probably not be done automatically as this needs admin rights!
// Let's try to check at least if those settings are configured (the check also works only if useAdmin is set to true though).
try
{
Expand Down Expand Up @@ -936,7 +936,7 @@ private bool SetNoScript(CacheItem<TCacheValue> item, When when, bool sync = fal

var setResult = _connection.Database.HashSet(fullKey, HashFieldValue, value, when, flags);

// setResult from fire and forget is alwys false, so we have to assume it works...
// setResult from fire and forget is always false, so we have to assume it works...
setResult = flags == CommandFlags.FireAndForget ? true : setResult;

if (setResult)
Expand Down Expand Up @@ -1054,4 +1054,4 @@ private void LoadScripts()
}
}
}
}
}
4 changes: 2 additions & 2 deletions src/CacheManager.StackExchange.Redis/RedisConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public RedisConfiguration(
/// <param name="database">The redis database to use.</param>
/// <param name="keyspaceNotificationsEnabled">Enables keyspace notifications to react on eviction/expiration of items.</param>
/// <param name="strictCompatibilityModeVersion">
/// Gets or sets a version number to eventually reduce the avaible features accessible by cachemanager.
/// Gets or sets a version number to eventually reduce the available features accessible by cachemanager.
/// </param>
public RedisConfiguration(
string key,
Expand Down Expand Up @@ -146,7 +146,7 @@ private ConfigurationOptions CreateConfigurationOptions()
public ConfigurationOptions ConfigurationOptions => _configurationOptions;

/// <summary>
/// Gets or sets a version number to eventually reduce the avaible features accessible by cachemanager.
/// Gets or sets a version number to eventually reduce the available features accessible by cachemanager.
/// E.g. set this to <c>"2.4"</c> to disable LUA support.
/// </summary>
/// <remarks>
Expand Down
Loading