ICacheManager.cs 929 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using JetBrains.Annotations;
  4. namespace Abp.Runtime.Caching
  5. {
  6. /// <summary>
  7. /// An upper level container for <see cref="ICache"/> objects.
  8. /// A cache manager should work as Singleton and track and manage <see cref="ICache"/> objects.
  9. /// </summary>
  10. public interface ICacheManager : IDisposable
  11. {
  12. /// <summary>
  13. /// Gets all caches.
  14. /// </summary>
  15. /// <returns>List of caches</returns>
  16. IReadOnlyList<ICache> GetAllCaches();
  17. /// <summary>
  18. /// Gets a <see cref="ICache"/> instance.
  19. /// It may create the cache if it does not already exists.
  20. /// </summary>
  21. /// <param name="name">
  22. /// Unique and case sensitive name of the cache.
  23. /// </param>
  24. /// <returns>The cache reference</returns>
  25. [NotNull] ICache GetCache([NotNull] string name);
  26. }
  27. }