Skip to content

)} )} ,System.Nullable{System.DateTimeOffset})} ,System.Type,System.Nullable{System.DateTimeOffset})}

IBlobCache.UpdateExpiration(string, DateTimeOffset?) method

Defined in

Type: IBlobCache Namespace: Akavache.Reactive Assembly: Akavache.Reactive.dll

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

Overloads

  • 1. IObservable<Unit> UpdateExpiration(string key, DateTimeOffset? absoluteExpiration)
  • 2. IObservable<Unit> UpdateExpiration(string key, Type type, DateTimeOffset? absoluteExpiration)
  • 3. IObservable<Unit> UpdateExpiration(IEnumerable<string> keys, DateTimeOffset? absoluteExpiration)
  • 4. IObservable<Unit> UpdateExpiration(IEnumerable<string> keys, Type type, DateTimeOffset? absoluteExpiration)

1. Overload

IObservable<Unit> UpdateExpiration(string key, DateTimeOffset? absoluteExpiration)

Summary: 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 cache expiration.

Parameters

NameTypeDescription
keystringThe key of the cache entry to update.
absoluteExpirationDateTimeOffset?The new expiration date. Pass null for no expiration.

Returns: IObservable -- A signal indicating when the operation is complete.

2. Overload

IObservable<Unit> UpdateExpiration(string key, Type type, DateTimeOffset? absoluteExpiration)

Summary: 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 cache expiration.

Parameters

NameTypeDescription
keystringThe key of the cache entry to update.
typeTypeThe type of the cached object.
absoluteExpirationDateTimeOffset?The new expiration date. Pass null for no expiration.

Returns: IObservable -- A signal indicating when the operation is complete.

3. Overload

IObservable<Unit> UpdateExpiration(IEnumerable<string> keys, DateTimeOffset? absoluteExpiration)

Summary: Updates the expiration date for multiple existing cache entries without reading or writing the cached data. This is useful when a server returns a NotModified response and you want to extend the cache expiration.

Parameters

NameTypeDescription
keysIEnumerableThe keys of the cache entries to update.
absoluteExpirationDateTimeOffset?The new expiration date. Pass null for no expiration.

Returns: IObservable -- A signal indicating when the operation is complete.

4. Overload

IObservable<Unit> UpdateExpiration(IEnumerable<string> keys, Type type, DateTimeOffset? absoluteExpiration)

Summary: Updates the expiration date for multiple existing cache entries without reading or writing the cached data. This is useful when a server returns a NotModified response and you want to extend the cache expiration.

Parameters

NameTypeDescription
keysIEnumerableThe keys of the cache entries to update.
typeTypeThe type of the cached objects.
absoluteExpirationDateTimeOffset?The new expiration date. Pass null for no expiration.

Returns: IObservable -- A signal indicating when the operation is complete.