Skip to content

Commit

Permalink
docs: use documentation tags where appropriate (#130)
Browse files Browse the repository at this point in the history
Use the breadth of .NET documentation tags where appropriate. The previous code had markdown in places which will not display correctly in Intellisense.

This also reduces a lot of copy-paste documentation by using inheritdoc.
  • Loading branch information
malandis authored Aug 31, 2022
1 parent b39b39c commit ee32af3
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 302 deletions.
47 changes: 6 additions & 41 deletions src/Momento.Sdk/ISimpleCacheClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,16 @@ public interface ISimpleCacheClient : IDisposable
/// <returns>Task object representing the result of the delete operation.</returns>
public Task<CacheDeleteResponse> DeleteAsync(string cacheName, byte[] key);

/// <summary>
/// Set the value in cache with a given time to live (TTL) seconds.
/// </summary>
/// <param name="cacheName">Name of the cache to store the item in.</param>
/// <param name="key">The key to set.</param>
/// <param name="value">The value to be stored.</param>
/// <param name="ttlSeconds">TTL for the item in cache. This TTL takes precedence over the TTL used when initializing a cache client. Defaults to client TTL.</param>
/// <returns>Task object representing the result of the set operation.</returns>
/// <inheritdoc cref="SetAsync(string, byte[], byte[], uint?)"/>
public Task<CacheSetResponse> SetAsync(string cacheName, string key, string value, uint? ttlSeconds = null);

/// <summary>
/// Get the cache value stored for the given key.
/// </summary>
/// <param name="cacheName">Name of the cache to perform the lookup in.</param>
/// <param name="key">The key to lookup.</param>
/// <returns>Task object representing containing the status of the get operation and the associated value.</returns>
/// <inheritdoc cref="GetAsync(string, byte[])"/>
public Task<CacheGetResponse> GetAsync(string cacheName, string key);

/// <summary>
/// Remove the key from the cache.
/// </summary>
/// <param name="cacheName">Name of the cache to delete the key from.</param>
/// <param name="key">The key to delete.</param>
/// <returns>Task object representing the result of the delete operation.</returns>
/// <inheritdoc cref="DeleteAsync(string, byte[])"/>
public Task<CacheDeleteResponse> DeleteAsync(string cacheName, string key);

/// <summary>
/// Set the value in cache with a given time to live (TTL) seconds.
/// </summary>
/// <param name="cacheName">Name of the cache to store the item in.</param>
/// <param name="key">The key to set.</param>
/// <param name="value">The value to be stored.</param>
/// <param name="ttlSeconds">TTL for the item in cache. This TTL takes precedence over the TTL used when initializing a cache client. Defaults to client TTL.</param>
/// <returns>Task object representing the result of the set operation.</returns>
/// <inheritdoc cref="SetAsync(string, byte[], byte[], uint?)"/>
public Task<CacheSetResponse> SetAsync(string cacheName, string key, byte[] value, uint? ttlSeconds = null);

/// <summary>
Expand All @@ -103,12 +79,7 @@ public interface ISimpleCacheClient : IDisposable
/// <returns>Task object representing the statuses of the get operation and the associated values.</returns>
public Task<CacheGetBatchResponse> GetBatchAsync(string cacheName, IEnumerable<byte[]> keys);

/// <summary>
/// Gets multiple values from the cache.
/// </summary>
/// <param name="cacheName">Name of the cache to perform the lookup in.</param>
/// <param name="keys">The keys to get.</param>
/// <returns>Task object representing the statuses of the get operation and the associated values.</returns>
/// <inheritdoc cref="GetBatchAsync(string, IEnumerable{byte[]})"/>
public Task<CacheGetBatchResponse> GetBatchAsync(string cacheName, IEnumerable<string> keys);

/// <summary>
Expand All @@ -120,12 +91,6 @@ public interface ISimpleCacheClient : IDisposable
/// <returns>Task object representing the result of the set operation.</returns>
public Task<CacheSetBatchResponse> SetBatchAsync(string cacheName, IEnumerable<KeyValuePair<byte[], byte[]>> items, uint? ttlSeconds = null);

/// <summary>
/// Sets multiple items in the cache. Overwrites existing items.
/// </summary>
/// <param name="cacheName">Name of the cache to store the items in.</param>
/// <param name="items">The items to set.</param>
/// <param name="ttlSeconds">TTL for the item in cache. This TTL takes precedence over the TTL used when initializing a cache client. Defaults to client TTL.</param>
/// <returns>Task object representing the result of the set operation.</returns>
/// <inheritdoc cref="SetBatchAsync(string, IEnumerable{KeyValuePair{byte[], byte[]}}, uint?)"/>
public Task<CacheSetBatchResponse> SetBatchAsync(string cacheName, IEnumerable<KeyValuePair<string, string>> items, uint? ttlSeconds = null);
}
Loading

0 comments on commit ee32af3

Please sign in to comment.