gi-soup-2.4.14: Libsoup bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Soup.Objects.Cache

Contents

Description

 

Synopsis

Exported types

toCache :: (MonadIO m, IsCache o) => o -> m Cache Source #

Methods

clear

cacheClear Source #

Arguments

:: (HasCallStack, MonadIO m, IsCache a) 
=> a

cache: a Cache

-> m () 

Will remove all entries in the cache plus all the cache files.

Since: 2.34

dump

cacheDump Source #

Arguments

:: (HasCallStack, MonadIO m, IsCache a) 
=> a

cache: a Cache

-> m () 

Synchronously writes the cache index out to disk. Contrast with cacheFlush, which writes pending cache <emphasis>entries</emphasis> to disk.

You must call this before exiting if you want your cache data to persist between sessions.

@since 2.34.

flush

cacheFlush Source #

Arguments

:: (HasCallStack, MonadIO m, IsCache a) 
=> a

cache: a Cache

-> m () 

This function will force all pending writes in the cache to be committed to disk. For doing so it will iterate the MainContext associated with cache's session as long as needed.

Contrast with cacheDump, which writes out the cache index file.

Since: 2.34

getMaxSize

cacheGetMaxSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsCache a) 
=> a

cache: a Cache

-> m Word32

Returns: the maximum size of the cache, in bytes.

Gets the maximum size of the cache.

Since: 2.34

load

cacheLoad Source #

Arguments

:: (HasCallStack, MonadIO m, IsCache a) 
=> a

cache: a Cache

-> m () 

Loads the contents of cache's index into memory.

Since: 2.34

new

cacheNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

cacheDir: the directory to store the cached data, or Nothing to use the default one

-> CacheType

cacheType: the CacheType of the cache

-> m Cache

Returns: a new Cache

Creates a new Cache.

Since: 2.34

setMaxSize

cacheSetMaxSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsCache a) 
=> a

cache: a Cache

-> Word32

maxSize: the maximum size of the cache, in bytes

-> m () 

Sets the maximum size of the cache.

Since: 2.34

Properties

cacheDir

cacheType