Interface IBulkBlobCache
- Namespace
- Akavache
- Assembly
- Akavache.Core.dll
A interface that handles bulk add/remove/invalidate functionality over many key/value pairs.
public interface IBulkBlobCache : IBlobCache, IDisposable
- Inherited Members
- Extension Methods
Methods
Get(IEnumerable<string>)
Retrieve several values from the key-value cache. If any of the keys are not in the cache, this method should return an IObservable which OnError's with KeyNotFoundException.
IObservable<IDictionary<string, byte[]>> Get(IEnumerable<string> keys)
Parameters
keys
IEnumerable<string>The keys to return asynchronously.
Returns
- IObservable<IDictionary<string, byte[]>>
A Future result representing the byte data for each key.
GetCreatedAt(IEnumerable<string>)
Returns the time that the keys were added to the cache, or returns null if the key isn't in the cache.
IObservable<IDictionary<string, DateTimeOffset?>> GetCreatedAt(IEnumerable<string> keys)
Parameters
keys
IEnumerable<string>The keys to return the date for.
Returns
- IObservable<IDictionary<string, DateTimeOffset?>>
The date the key was created on.
Insert(IDictionary<string, byte[]>, DateTimeOffset?)
Inserts several keys into the database at one time. If any individual insert fails, this operation should cancel the entire insert (i.e. it should not partially succeed).
IObservable<Unit> Insert(IDictionary<string, byte[]> keyValuePairs, DateTimeOffset? absoluteExpiration = null)
Parameters
keyValuePairs
IDictionary<string, byte[]>The keys and values to insert.
absoluteExpiration
DateTimeOffset?An optional expiration date. After the specified date, the key-value pair should be removed.
Returns
- IObservable<Unit>
A signal to indicate when the key has been inserted.
Invalidate(IEnumerable<string>)
Remove several keys from the cache. If the key doesn't exist, this method should do nothing and return (not throw KeyNotFoundException).
IObservable<Unit> Invalidate(IEnumerable<string> keys)
Parameters
keys
IEnumerable<string>The key to remove from the cache.
Returns
- IObservable<Unit>
A observable that signals when the operational is completed.