1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Caching.ExpiringCacheMap.Utils.Types
-- Copyright: (c) 2014 Edward L. Blake
-- License: BSD-style
-- Maintainer: Edward L. Blake <edwardlblake@gmail.com>
-- Stability: experimental
-- Portability: portable
--
-- Simple types.
--
module Caching.ExpiringCacheMap.Utils.Types (
-- * Types
TimeUnits,
ECMMapSize,
ECMULength,
ECMIncr,
) where
import Data.Word (Word32)
-- | Integer involved in the time units used to determine when an item expires.
-- The time units used can be any arbitrary integer time representation, such
-- as seconds or milliseconds for examples. They can also be deterministic time
-- steps in a sequencing monad.
--
type TimeUnits = Int
-- | Integer involved in the size of a key-value map.
type ECMMapSize = Int
-- | Integer involved in the length of the usage history list.
type ECMULength = Int
-- | Unsigned integer ('Word32') involved in the cache state incrementing accumulator.
type ECMIncr = Word32
|