You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Gets a <see cref="UserAccess"/> cached for a particular key, updating the value if necessary.
20
+
/// </summary>
21
+
/// <remarks>
22
+
/// This method returns a previously cached <see cref="UserAccess"/> when possible. If any
23
+
/// of the following conditions are met, the <paramref name="refreshCallback"/> function
24
+
/// will be called to obtain a new value for <paramref name="key"/> which is then added to
25
+
/// the cache, replacing any previously cached value.
26
+
///
27
+
/// <list type="bullet">
28
+
/// <item>The cache does not contain any value associated with <paramref name="key"/>.</item>
29
+
/// <item><paramref name="forceCacheRefresh"/> is <c>true</c>.</item>
30
+
/// <item>The previously cached <see cref="UserAccess"/> for <paramref name="key"/> has expired
31
+
/// (see <see cref="IdentityToken.IsExpired()"/>).</item>
32
+
/// </list>
33
+
///
34
+
/// <para>If any of the above conditions is met and <paramref name="refreshCallback"/> is <c>null</c>,
35
+
/// the previously cached value for <paramref name="key"/>, if any, is removed from the cache
36
+
/// and the method returns <c>null</c>.</para>
37
+
/// </remarks>
38
+
/// <param name="key">The key.</param>
39
+
/// <param name="refreshCallback">A function which returns a new value for the specified <paramref name="key"/>,
40
+
/// or <c>null</c> if no update function available (see remarks). This function may perform a synchronous
41
+
/// authentication to an <see cref="IIdentityProvider"/>.</param>
42
+
/// <param name="forceCacheRefresh">If <c>true</c>, the value associated with <paramref name="key"/> will be always be refreshed by calling <paramref name="refreshCallback"/>, even if a value is already cached.</param>
43
+
/// <returns>
44
+
/// The cached <see cref="UserAccess"/> associated with the specified <paramref name="key"/>.
45
+
/// If no cached value is available (see remarks), the method returns <c>null</c>.
46
+
/// </returns>
47
+
/// <exception cref="ArgumentNullException">If <paramref name="key"/> is <c>null</c>.</exception>
/// Represents a thread-safe cache of objects identified by string keys.
126
+
/// </summary>
127
+
/// <typeparam name="T">Type type of objects stored in the cache.</typeparam>
87
128
publicinterfaceICache<T>
88
129
{
130
+
/// <summary>
131
+
/// Gets a value cached for a particular key, updating the value if necessary.
132
+
/// </summary>
133
+
/// <remarks>
134
+
/// This method returns a previously cached value when possible. If any of the following
135
+
/// conditions are met, the <paramref name="refreshCallback"/> function will be called to
136
+
/// obtain a new value for <paramref name="key"/> which is then added to the cache,
137
+
/// replacing any previously cached value.
138
+
///
139
+
/// <list type="bullet">
140
+
/// <item>The cache does not contain any value associated with <paramref name="key"/>.</item>
141
+
/// <item><paramref name="forceCacheRefresh"/> is <c>true</c>.</item>
142
+
/// <item>The previously cached value for <paramref name="key"/> is no longer valid. The exact
143
+
/// algorithm for determining whether or not a value is valid in implementation-defined.</item>
144
+
/// </list>
145
+
///
146
+
/// <para>If any of the above conditions is met and <paramref name="refreshCallback"/> is <c>null</c>,
147
+
/// the previously cached value for <paramref name="key"/>, if any, is removed from the cache
148
+
/// and the default value for <typeparamref name="T"/> is returned.</para>
149
+
/// </remarks>
150
+
/// <param name="key">The key.</param>
151
+
/// <param name="refreshCallback">A function which returns a new value for the specified <paramref name="key"/>, or <c>null</c> if no update function available (see remarks).</param>
152
+
/// <param name="forceCacheRefresh">If <c>true</c>, the value associated with <paramref name="key"/> will be always be refreshed by calling <paramref name="refreshCallback"/>, even if a value is already cached.</param>
153
+
/// <returns>
154
+
/// The cached value associated with the specified <paramref name="key"/>. If no cached value is
155
+
/// available (see remarks), the method returns the default value for <typeparamref name="T"/>.
156
+
/// </returns>
157
+
/// <exception cref="ArgumentNullException">If <paramref name="key"/> is <c>null</c>.</exception>
0 commit comments