Skip to content

SqliteBlobCache class

Defined in

Namespace: Akavache.Sqlite3 Assembly: Akavache.Sqlite3.dll Full name: Akavache.Sqlite3.SqliteBlobCache Modifiers: public

Summary

View source

        Provides a SQLite-based implementation of IBlobCache for persistent data storage.
        This cache stores data in a SQLite database file for reliable persistence across application restarts.
        

Applies to

net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-android36.0, net10.0-ios26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net9.0, net9.0-windows10.0.19041, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net462

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

Implements: IBlobCache, IDisposable

Constructors

NameSummary
.ctorInitializes a new instance of the [SqliteBlobCache](# class.

Properties

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

Methods

NameSummary
FlushThis method guarantees that all in-flight inserts have completed and any indexes have been written to disk.
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.
InsertInserts the specified key/value pairs into the blob.
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.
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).
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...
Dispose
BeforeWriteToDiskFilterHook for encrypting data before writing to disk.
Inherited members