gi-soup-2.4.26: Libsoup bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Soup.Objects.Cache

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Cache Source #

Memory-managed wrapper type.

Constructors

Cache (ManagedPtr Cache) 

Instances

Instances details
Eq Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

Methods

(==) :: Cache -> Cache -> Bool #

(/=) :: Cache -> Cache -> Bool #

GObject Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

ManagedPtrNewtype Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

Methods

toManagedPtr :: Cache -> ManagedPtr Cache

TypedObject Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

Methods

glibType :: IO GType

HasParentTypes Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

IsGValue (Maybe Cache) Source #

Convert Cache to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Soup.Objects.Cache

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Cache -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Cache)

type ParentTypes Cache Source # 
Instance details

Defined in GI.Soup.Objects.Cache

type ParentTypes Cache = '[Object, SessionFeature]

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

Instances details
(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.

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, MonadIO m) => Text -> m (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, MonadIO m) => CacheType -> m (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