WIP on refreshing expired sessions

- Move RethinkDB operations to their own module
- Incorporated cancellation tokens throughout
This commit is contained in:
2022-04-21 21:38:51 -04:00
parent 9a6b04412a
commit c79306078c
6 changed files with 283 additions and 201 deletions

View File

@@ -0,0 +1,30 @@
namespace RethinkDB.DistributedCache
/// Persistence object for a cache entry
[<CLIMutable; NoComparison; NoEquality>]
type CacheEntry =
{ /// The ID for the cache entry
id : string
/// The payload for the cache entry (as a UTF-8 string)
payload : string
/// The ticks at which this entry expires
expiresAt : int64
/// The number of ticks in the sliding expiration
slidingExp : int64
/// The ticks for absolute expiration
absoluteExp : int64
}
/// Field names for the above
[<AutoOpen>]
module private CacheEntry =
[<Literal>]
let expiresAt = "expiresAt"
[<Literal>]
let slidingExp = "slidingExp"
[<Literal>]
let absoluteExp = "absoluteExp"