gi-soup-2.4.18: Libsoup bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Soup.Objects.Cache

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Cache Source #

Memory-managed wrapper type.

Constructors

Cache (ManagedPtr Cache) 
Instances
GObject Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

Methods

gobjectType :: IO GType #

HasParentTypes Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

type ParentTypes Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

type ParentTypes Cache = Object ': (SessionFeature ': ([] :: [Type]))

class (GObject o, IsDescendantOf Cache o) => IsCache o Source #

Type class for types which can be safely cast to Cache, for instance with toCache.

Instances
(GObject o, IsDescendantOf Cache o) => IsCache o Source # 
Instance details

Defined in GI.Soup.Objects.Cache

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

Cast to Cache, for types for which this is known to be safe. For general casts, use castTo.

noCache :: Maybe Cache Source #

A convenience alias for Nothing :: Maybe Cache.

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) 
=> Maybe Text

cacheDir: the directory to store the cached data, or Nothing to use the default one. Note that since the cache isn't safe to access for multiple processes at once, and the default directory isn't namespaced by process, clients are strongly discouraged from passing Nothing.

-> 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

No description available in the introspection data.

constructCacheCacheDir :: IsCache o => Text -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “cache-dir” property. This is rarely needed directly, but it is used by new.

getCacheCacheDir :: (MonadIO m, IsCache o) => o -> m (Maybe Text) Source #

Get the value of the “cache-dir” property. When overloading is enabled, this is equivalent to

get cache #cacheDir

cacheType

No description available in the introspection data.

constructCacheCacheType :: IsCache o => CacheType -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “cache-type” property. This is rarely needed directly, but it is used by new.

getCacheCacheType :: (MonadIO m, IsCache o) => o -> m CacheType Source #

Get the value of the “cache-type” property. When overloading is enabled, this is equivalent to

get cache #cacheType