Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module containing a form of caching where values for given keys are preloaded ahead of time. | Once warmed up requests for preloaded keys will be instant, with the values refreshed in the background.
- data PreloadedOptions a
- defaultPreloadedOptions :: HashSet a -> PreloadedOptions a
- preloadingService :: forall m n a b. (MonadIO m, MonadBaseControl IO m, MonadBaseControl IO n, Eq a, Hashable a, Show a) => PreloadedOptions a -> MultiGetService m a b -> n (MultiGetService m a b, () -> n ())
Documentation
data PreloadedOptions a Source
Options for determining behaviour of preloading services.
defaultPreloadedOptions :: HashSet a -> PreloadedOptions a Source
Defaulted options for preloading a HashSet of keys with a 30 second refresh time.
:: (MonadIO m, MonadBaseControl IO m, MonadBaseControl IO n, Eq a, Hashable a, Show a) | |
=> PreloadedOptions a | Instance of |
-> MultiGetService m a b | The service to perform preloading of. |
-> n (MultiGetService m a b, () -> n ()) |
Preloads the results of calls for given keys.