MemoryDistributedCache Osztály

Definíció

Implementálja a IDistributedCache következőt IMemoryCache: .

public ref class MemoryDistributedCache : Microsoft::Extensions::Caching::Distributed::IDistributedCache
public class MemoryDistributedCache : Microsoft.Extensions.Caching.Distributed.IDistributedCache
type MemoryDistributedCache = class
    interface IDistributedCache
Public Class MemoryDistributedCache
Implements IDistributedCache
Öröklődés
MemoryDistributedCache
Megvalósítás

Konstruktorok

Name Description
MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>, ILoggerFactory)

Létrehoz egy új MemoryDistributedCache-példányt.

MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>)

Létrehoz egy új MemoryDistributedCache-példányt.

Metódusok

Name Description
Get(String)

Lekéri a kulcshoz társított megadott elemet a IMemoryCache bájttömbből.

GetAsync(String, CancellationToken)

Aszinkron módon lekéri a kulcshoz társított megadott elemet a IMemoryCache bájttömbből.

Refresh(String)

Frissíti a kulcshoz társított megadott elemet a IMemoryCacheprogramból.

RefreshAsync(String, CancellationToken)

Aszinkron módon frissíti a kulcshoz társított megadott elemet a IMemoryCache.

Remove(String)

Eltávolítja a kulcshoz társított megadott elemet a IMemoryCacheprogramból.

RemoveAsync(String, CancellationToken)

Aszinkron módon eltávolítja a kulcshoz társított megadott elemet a IMemoryCache.

Set(String, Byte[], DistributedCacheEntryOptions)

A megadott elemet bájttömbként állítja be egy IMemoryCache kulcshoz.

SetAsync(String, Byte[], DistributedCacheEntryOptions, CancellationToken)

Aszinkron módon beállítja a megadott elemet, amely egy kulcshoz van társítva a IMemoryCache bájttömbben.

Bővítő metódusok

Name Description
GetString(IDistributedCache, String)

Sztringet kap a megadott gyorsítótárból a megadott kulccsal.

GetStringAsync(IDistributedCache, String, CancellationToken)

Aszinkron módon lekéri a megadott gyorsítótárból a megadott kulccsal rendelkező sztringet.

Set(IDistributedCache, String, Byte[])

Bájtok sorozatát állítja be a megadott gyorsítótárban a megadott kulccsal.

SetAsync(IDistributedCache, String, Byte[], CancellationToken)

Aszinkron módon bájtok sorozatát állítja be a megadott gyorsítótárban a megadott kulccsal.

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

Beállít egy sztringet a megadott gyorsítótárban a megadott kulccsal.

SetString(IDistributedCache, String, String)

Beállít egy sztringet a megadott gyorsítótárban a megadott kulccsal.

SetStringAsync(IDistributedCache, String, String, CancellationToken)

Aszinkron módon beállít egy sztringet a megadott gyorsítótárban a megadott kulccsal.

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken)

Aszinkron módon beállít egy sztringet a megadott gyorsítótárban a megadott kulccsal.

A következőre érvényes: