Skip to content

InMemoryBlobCacheBase class

Defined in

Namespace: Akavache.Reactive Assembly: Akavache.Reactive.dll Full name: Akavache.Reactive.InMemoryBlobCacheBase Modifiers: public

Summary

View source

        Base class for in-memory blob cache implementations that provides common functionality
        for all serialization-specific InMemoryBlobCache implementations.
        

Applies to

net10.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-tvos26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-tvos18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-ios18.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.5, netstandard2.1, net481, net462, net471

Class hierarchy
classDiagram
class InMemoryBlobCacheBase
class ISecureBlobCache {
    <>
}
ISecureBlobCache <|.. InMemoryBlobCacheBase
class IBlobCache {
    <>
}
IBlobCache <|.. InMemoryBlobCacheBase
class IDisposable {
    <>
}
IDisposable <|.. InMemoryBlobCacheBase

Implements: ISecureBlobCache, IBlobCache, IDisposable

Remarks

Initializes a new instance of the InMemoryBlobCacheBase class.

Constructors

NameSummary
.ctorBase class for in-memory blob cache implementations that provides common functionality for all serialization-specific InMemoryBlobCache implementations.

Properties

NameSummary
SchedulerGets the IScheduler used to defer operations. By default, this is BlobCache.TaskpoolScheduler.
SerializerGets the serializer.
ForcedDateTimeKindGets or sets the DateTimeKind handling for BSON readers to be forced.

Methods

NameSummary
InsertInserts the specified key/value pairs into the blob.
GetRetrieve a value from the key-value cache. If the key is not in the cache, this method should return an IObservable which OnError's with KeyNotFoundException.
GetAllGets a observable of key value pairs with the specified keys with their corresponding values.
GetAllKeysReturn all keys in the cache. Note that this method is normally for diagnostic / testing purposes, and that it is not guaranteed to be accurate with respect to in-flight...
GetCreatedAtGets a observable of key value pairs with the specified keys with their corresponding created DateTimeOffset if it's available.
FlushThis method guarantees that all in-flight inserts have completed and any indexes have been written to disk.
InvalidateRemove a key from the cache. If the key doesn't exist, this method should do nothing and return (not throw KeyNotFoundException).
InvalidateAllInvalidates all entries for the specified type.
UpdateExpirationUpdates the expiration date for an existing cache entry without reading or writing the cached data. This is useful when a server returns a NotModified response and you want to extend the...
VacuumThis method eagerly removes all expired keys from the blob cache, as well as does any cleanup operations that makes sense (Hint: on SQLite3 it does a Vacuum).
Dispose
InsertObjectInsert an object into the cache using the configured serializer.
GetObjectGet an object from the cache and deserialize it using the configured serializer.
GetAllObjectsReturn all objects of a specific Type in the cache.
GetObjectCreatedAtReturns the time that the object with the key was added to the cache, or returns null if the key isn't in the cache.
InvalidateObjectInvalidates a single object from the cache.
InvalidateAllObjectsInvalidates all objects of the specified type.

Derived types

Inherited members