-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Locally cache a json file obtained by http
--   
--   A small library for caching a slow-changing remote json file in a
--   specified directory (under "~/.cache/"). When the json is requested
--   and the cache file is still fresh enough it is read directly from the
--   local cache, otherwise the cached file is refreshed first.
@package cached-json-file
@version 0.1.1

module System.Cached.JSON

-- | If the local cached json file is new enough then use it, otherwise
--   refresh from the remote url.
getCachedJSON :: (FromJSON a, ToJSON a) => String -> FilePath -> String -> NominalDiffTime -> IO a

-- | Similar to getCachedJSON but takes an IO procedure that fetches the
--   remote json data.
getCachedJSONQuery :: (FromJSON a, ToJSON a) => String -> FilePath -> IO a -> NominalDiffTime -> IO a
lookupKey :: FromJSON a => Text -> Object -> Maybe a
