1 datahelpers DataValueCacheTT
RaidMax edited this page 2023-05-20 22:09:21 -05:00

DataValueCache<TEntityType, TReturnType> Public class

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph Data.Helpers
  Data.Helpers.DataValueCache_2[[DataValueCache< TEntityType,TReturnType >]]

  end
  subgraph Data.Abstractions
  Data.Abstractions.IDataValueCache_2[[IDataValueCache< TEntityType,TReturnType >]]
  class Data.Abstractions.IDataValueCache_2 interfaceStyle;

  end
Data.Abstractions.IDataValueCache_2 --> Data.Helpers.DataValueCache_2

Members

Methods

Protected methods

Returns Name
void Finalize()

Public methods

Returns Name
Task<TReturnType> GetCacheItem(...)
void SetCacheItem(...)

Details

Inheritance

Constructors

DataValueCache

Source code

public DataValueCache(ILogger<DataValueCache<TEntityType, TReturnType>> logger, IDatabaseContextFactory contextFactory)
Arguments
Type Name Description
ILogger<DataValueCache<TEntityType, TReturnType>> logger
IDatabaseContextFactory contextFactory

Methods

Finalize

Source code

protected override void Finalize()

SetCacheItem [1/2]

Source code

public virtual void SetCacheItem(Func<DbSet<TEntityType>, CancellationToken, Task<TReturnType>> getter, string key, Nullable<TimeSpan> expirationTime, bool autoRefresh)
Arguments
Type Name Description
Func<DbSet<TEntityType>, CancellationToken, Task<TReturnType>> getter
string key
Nullable<TimeSpan> expirationTime
bool autoRefresh

SetCacheItem [2/2]

Source code

public virtual void SetCacheItem(Func<DbSet<TEntityType>, IEnumerable<object>, CancellationToken, Task<TReturnType>> getter, string key, IEnumerable<object> ids, Nullable<TimeSpan> expirationTime, bool autoRefresh)
Arguments
Type Name Description
Func<DbSet<TEntityType>, IEnumerable<object>, CancellationToken, Task<TReturnType>> getter
string key
IEnumerable<object> ids
Nullable<TimeSpan> expirationTime
bool autoRefresh

GetCacheItem [1/2]

Source code

public virtual Task<TReturnType> GetCacheItem(string keyName, CancellationToken cancellationToken)
Arguments
Type Name Description
string keyName
CancellationToken cancellationToken

GetCacheItem [2/2]

public virtual async Task<TReturnType> GetCacheItem(string keyName, IEnumerable<object> ids, CancellationToken cancellationToken)
Arguments
Type Name Description
string keyName
IEnumerable<object> ids
CancellationToken cancellationToken

Generated with ModularDoc