SqliteBlobCache class¶
Defined in
Namespace: Akavache.Sqlite3
Assembly: Akavache.Sqlite3.dll
Full name: Akavache.Sqlite3.SqliteBlobCache
Modifiers: public
Summary¶
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¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [SqliteBlobCache](# class. |
Properties¶
| Name | Summary |
|---|---|
| Connection | Gets the underlying [IAkavacheConnection](# |
| Scheduler | Gets the IScheduler used to defer operations. By default, this is BlobCache.TaskpoolScheduler. |
| ForcedDateTimeKind | Gets or sets the DateTimeKind handling for BSON readers to be forced. |
| Serializer | Gets the serializer. |
Methods¶
| Name | Summary |
|---|---|
| Flush | This method guarantees that all in-flight inserts have completed and any indexes have been written to disk. |
| Get | Retrieve 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. |
| GetAll | Gets a observable of key value pairs with the specified keys with their corresponding values. |
| GetAllKeys | Return 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... |
| GetCreatedAt | Gets a observable of key value pairs with the specified keys with their corresponding created DateTimeOffset if it's available. |
| Insert | Inserts the specified key/value pairs into the blob. |
| Invalidate | Remove a key from the cache. If the key doesn't exist, this method should do nothing and return (not throw KeyNotFoundException). |
| InvalidateAll | Invalidates all entries for the specified type. |
| Vacuum | This 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). |
| UpdateExpiration | Updates 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 | |
| BeforeWriteToDiskFilter | Hook for encrypting data before writing to disk. |