InMemoryBlobCacheBase class¶
Defined in
Namespace: Akavache.Reactive
Assembly: Akavache.Reactive.dll
Full name: Akavache.Reactive.InMemoryBlobCacheBase
Modifiers: public
Summary¶
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¶
| Name | Summary |
|---|---|
| .ctor | Base class for in-memory blob cache implementations that provides common functionality for all serialization-specific InMemoryBlobCache implementations. |
Properties¶
| Name | Summary |
|---|---|
| Scheduler | Gets the IScheduler used to defer operations. By default, this is BlobCache.TaskpoolScheduler. |
| Serializer | Gets the serializer. |
| ForcedDateTimeKind | Gets or sets the DateTimeKind handling for BSON readers to be forced. |
Methods¶
| Name | Summary |
|---|---|
| Insert | Inserts the specified key/value pairs into the blob. |
| 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. |
| Flush | This method guarantees that all in-flight inserts have completed and any indexes have been written to disk. |
| 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. |
| 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... |
| 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). |
| Dispose | |
| InsertObject | Insert an object into the cache using the configured serializer. |
| GetObject | Get an object from the cache and deserialize it using the configured serializer. |
| GetAllObjects | Return all objects of a specific Type in the cache. |
| GetObjectCreatedAt | Returns the time that the object with the key was added to the cache, or returns null if the key isn't in the cache. |
| InvalidateObject | Invalidates a single object from the cache. |
| InvalidateAllObjects | Invalidates all objects of the specified type. |