Interface IObjectBlobCache
- Namespace
- Akavache
- Assembly
- Akavache.Core.dll
A BlobCache implementation that can handle objects.
public interface IObjectBlobCache : IBlobCache, IDisposable
- Inherited Members
- Extension Methods
Methods
GetAllObjects<T>()
Return all objects of a specific Type in the cache.
IObservable<IEnumerable<T>> GetAllObjects<T>()
Returns
- IObservable<IEnumerable<T>>
A Future result representing all objects in the cache with the specified Type.
Type Parameters
T
The type of object associated with the blob.
GetObjectCreatedAt<T>(string)
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.
IObservable<DateTimeOffset?> GetObjectCreatedAt<T>(string key)
Parameters
key
stringThe key to return the date for.
Returns
- IObservable<DateTimeOffset?>
The date the key was created on.
Type Parameters
T
The type of object associated with the blob.
GetObject<T>(string)
Get an object from the cache and deserialize it via the JSON serializer.
IObservable<T?> GetObject<T>(string key)
Parameters
key
stringThe key to look up in the cache.
Returns
- IObservable<T>
A Future result representing the object in the cache.
Type Parameters
T
The type of object associated with the blob.
InsertObject<T>(string, T, DateTimeOffset?)
Insert an object into the cache, via the JSON serializer.
IObservable<Unit> InsertObject<T>(string key, T value, DateTimeOffset? absoluteExpiration = null)
Parameters
key
stringThe key to associate with the object.
value
TThe object to serialize.
absoluteExpiration
DateTimeOffset?An optional expiration date.
Returns
- IObservable<Unit>
A Future result representing the completion of the insert.
Type Parameters
T
The type of object associated with the blob.
InvalidateAllObjects<T>()
Invalidates all objects of the specified type. To invalidate all objects regardless of type, use InvalidateAll.
IObservable<Unit> InvalidateAllObjects<T>()
Returns
- IObservable<Unit>
A Future result representing the completion of the invalidation.
Type Parameters
T
The type of object associated with the blob.
InvalidateObject<T>(string)
Invalidates a single object from the cache. It is important that the Type Parameter for this method be correct, and you cannot use IBlobCache.Invalidate to perform the same task.
IObservable<Unit> InvalidateObject<T>(string key)
Parameters
key
stringThe key to invalidate.
Returns
- IObservable<Unit>
A Future result representing the completion of the invalidation.
Type Parameters
T
The type of object associated with the blob.