@@ -61,6 +61,9 @@ public abstract partial class CacheBase :
61
61
/// </summary>
62
62
/// <remarks>
63
63
/// <para>
64
+ /// <see cref="CacheBase"/> implementation always yield <c>false</c>, override it if required.
65
+ /// </para>
66
+ /// <para>
64
67
/// This property should yield <see langword="false" /> if <see cref="GetMany" /> delegates
65
68
/// its implementation to <see cref="Get"/>.
66
69
/// </para>
@@ -75,7 +78,7 @@ public abstract partial class CacheBase :
75
78
/// gets to perform. Its <see cref="CacheBase" /> default implementation is adequate for this case.
76
79
/// </para>
77
80
/// </remarks>
78
- public abstract bool PreferMultipleGet { get ; }
81
+ public virtual bool PreferMultipleGet => false ;
79
82
80
83
#region Basic abstract operations
81
84
@@ -141,6 +144,13 @@ public abstract partial class CacheBase :
141
144
/// <param name="keys">The keys to be retrieved from the cache.</param>
142
145
/// <returns>The cached items, matching each key of <paramref name="keys"/> respectively. For each missed key,
143
146
/// it will contain a <see langword="null" />.</returns>
147
+ /// <remarks>
148
+ /// <para>As all other <c>Many</c> method, its default implementation just falls back on calling
149
+ /// the single operation method in a loop. Cache providers should override it with an actual multiple
150
+ /// implementation if they can support it.</para>
151
+ /// <para>Additionally, if overriding <c>GetMany</c>, consider overriding also
152
+ /// <see cref="PreferMultipleGet"/>.</para>
153
+ /// </remarks>
144
154
public virtual object [ ] GetMany ( object [ ] keys )
145
155
{
146
156
if ( keys == null )
0 commit comments