@@ -49,12 +49,12 @@ protected EasyCachingAbstractProvider(IDistributedLockFactory lockFactory, BaseP
4949 public abstract Task BaseFlushAsync ( CancellationToken cancellationToken = default ) ;
5050 public abstract CacheValue < T > BaseGet < T > ( string cacheKey , Func < T > dataRetriever , TimeSpan expiration ) ;
5151 public abstract CacheValue < T > BaseGet < T > ( string cacheKey ) ;
52- public abstract IEnumerable < string > BaseGetAllKeys ( ) ;
53- public abstract Task < IEnumerable < string > > BaseGetAllKeysAsync ( CancellationToken cancellationToken = default ) ;
52+ public abstract IEnumerable < string > BaseGetAllKeys ( string prefix = "" ) ;
53+ public abstract Task < IEnumerable < string > > BaseGetAllKeysAsync ( string prefix = "" , CancellationToken cancellationToken = default ) ;
5454 public abstract IDictionary < string , CacheValue < T > > BaseGetAll < T > ( IEnumerable < string > cacheKeys ) ;
55- public abstract IDictionary < string , CacheValue < T > > BaseGetAll < T > ( ) ;
55+ public abstract IDictionary < string , CacheValue < T > > BaseGetAll < T > ( string prefix = "" ) ;
5656 public abstract Task < IDictionary < string , CacheValue < T > > > BaseGetAllAsync < T > ( IEnumerable < string > cacheKeys , CancellationToken cancellationToken = default ) ;
57- public abstract Task < IDictionary < string , CacheValue < T > > > BaseGetAllAsync < T > ( CancellationToken cancellationToken = default ) ;
57+ public abstract Task < IDictionary < string , CacheValue < T > > > BaseGetAllAsync < T > ( string prefix = "" , CancellationToken cancellationToken = default ) ;
5858 public abstract Task < CacheValue < T > > BaseGetAsync < T > ( string cacheKey , Func < Task < T > > dataRetriever , TimeSpan expiration , CancellationToken cancellationToken = default ) ;
5959 public abstract Task < object > BaseGetAsync ( string cacheKey , Type type , CancellationToken cancellationToken = default ) ;
6060 public abstract Task < CacheValue < T > > BaseGetAsync < T > ( string cacheKey , CancellationToken cancellationToken = default ) ;
@@ -261,13 +261,13 @@ public CacheValue<T> Get<T>(string cacheKey)
261261 }
262262 }
263263
264- public IEnumerable < string > GetAllKeys ( )
264+ public IEnumerable < string > GetAllKeys ( string prefix = "" )
265265 {
266266 var operationId = s_diagnosticListener . WriteGetCacheBefore ( new BeforeGetRequestEventData ( CachingProviderType . ToString ( ) , Name , nameof ( GetAllKeys ) , null ) ) ;
267267 Exception e = null ;
268268 try
269269 {
270- return BaseGetAllKeys ( ) ;
270+ return BaseGetAllKeys ( prefix ) ;
271271 }
272272 catch ( Exception ex )
273273 {
@@ -287,13 +287,13 @@ public IEnumerable<string> GetAllKeys()
287287 }
288288 }
289289
290- public async Task < IEnumerable < string > > GetAllKeysAsync ( CancellationToken cancellationToken = default )
290+ public async Task < IEnumerable < string > > GetAllKeysAsync ( string prefix = "" , CancellationToken cancellationToken = default )
291291 {
292292 var operationId = s_diagnosticListener . WriteGetCacheBefore ( new BeforeGetRequestEventData ( CachingProviderType . ToString ( ) , Name , nameof ( GetAllKeysAsync ) , null ) ) ;
293293 Exception e = null ;
294294 try
295295 {
296- return await BaseGetAllKeysAsync ( cancellationToken ) ;
296+ return await BaseGetAllKeysAsync ( prefix , cancellationToken ) ;
297297 }
298298 catch ( Exception ex )
299299 {
@@ -339,13 +339,13 @@ public IDictionary<string, CacheValue<T>> GetAll<T>(IEnumerable<string> cacheKey
339339 }
340340 }
341341
342- public IDictionary < string , CacheValue < object > > GetAll ( )
342+ public IDictionary < string , CacheValue < object > > GetAll ( string prefix = "" )
343343 {
344344 var operationId = s_diagnosticListener . WriteGetCacheBefore ( new BeforeGetRequestEventData ( CachingProviderType . ToString ( ) , Name , nameof ( GetAll ) , null ) ) ;
345345 Exception e = null ;
346346 try
347347 {
348- return BaseGetAll < object > ( ) ;
348+ return BaseGetAll < object > ( prefix ) ;
349349 }
350350 catch ( Exception ex )
351351 {
@@ -365,13 +365,13 @@ public IDictionary<string, CacheValue<object>> GetAll()
365365 }
366366 }
367367
368- public async Task < IDictionary < string , CacheValue < object > > > GetAllAsync ( CancellationToken cancellationToken = default )
368+ public async Task < IDictionary < string , CacheValue < object > > > GetAllAsync ( string prefix = "" , CancellationToken cancellationToken = default )
369369 {
370370 var operationId = s_diagnosticListener . WriteGetCacheBefore ( new BeforeGetRequestEventData ( CachingProviderType . ToString ( ) , Name , nameof ( GetAllAsync ) , null ) ) ;
371371 Exception e = null ;
372372 try
373373 {
374- return await BaseGetAllAsync < object > ( cancellationToken ) ;
374+ return await BaseGetAllAsync < object > ( prefix , cancellationToken ) ;
375375 }
376376 catch ( Exception ex )
377377 {
0 commit comments