Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Soup.Objects.Cache
Contents
Description
- newtype Cache = Cache (ManagedPtr Cache)
- class GObject o => IsCache o
- toCache :: IsCache o => o -> IO Cache
- noCache :: Maybe Cache
- data CacheClearMethodInfo
- cacheClear :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- data CacheDumpMethodInfo
- cacheDump :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- data CacheFlushMethodInfo
- cacheFlush :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- data CacheGetMaxSizeMethodInfo
- cacheGetMaxSize :: (HasCallStack, MonadIO m, IsCache a) => a -> m Word32
- data CacheLoadMethodInfo
- cacheLoad :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- cacheNew :: (HasCallStack, MonadIO m) => Text -> CacheType -> m Cache
- data CacheSetMaxSizeMethodInfo
- cacheSetMaxSize :: (HasCallStack, MonadIO m, IsCache a) => a -> Word32 -> m ()
- data CacheCacheDirPropertyInfo
- cacheCacheDir :: AttrLabelProxy "cacheDir"
- constructCacheCacheDir :: IsCache o => Text -> IO (GValueConstruct o)
- getCacheCacheDir :: (MonadIO m, IsCache o) => o -> m (Maybe Text)
- data CacheCacheTypePropertyInfo
- cacheCacheType :: AttrLabelProxy "cacheType"
- constructCacheCacheType :: IsCache o => CacheType -> IO (GValueConstruct o)
- getCacheCacheType :: (MonadIO m, IsCache o) => o -> m CacheType
Exported types
Constructors
Cache (ManagedPtr Cache) |
Instances
GObject Cache Source # | |
IsObject Cache Source # | |
IsSessionFeature Cache Source # | |
IsCache Cache Source # | |
((~) * info (ResolveCacheMethod t Cache), MethodInfo * info Cache p) => IsLabel t (Cache -> p) Source # | |
((~) * info (ResolveCacheMethod t Cache), MethodInfo * info Cache p) => IsLabelProxy t (Cache -> p) Source # | |
HasAttributeList * Cache Source # | |
type AttributeList Cache Source # | |
type SignalList Cache Source # | |
Methods
clear
data CacheClearMethodInfo Source #
Instances
((~) * signature (m ()), MonadIO m, IsCache a) => MethodInfo * CacheClearMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> m () |
Will remove all entries in the cache
plus all the cache files.
Since: 2.34
dump
data CacheDumpMethodInfo Source #
Instances
((~) * signature (m ()), MonadIO m, IsCache a) => MethodInfo * CacheDumpMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> 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
data CacheFlushMethodInfo Source #
Instances
((~) * signature (m ()), MonadIO m, IsCache a) => MethodInfo * CacheFlushMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> 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
data CacheGetMaxSizeMethodInfo Source #
Instances
((~) * signature (m Word32), MonadIO m, IsCache a) => MethodInfo * CacheGetMaxSizeMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> m Word32 | Returns: the maximum size of the cache, in bytes. |
Gets the maximum size of the cache.
Since: 2.34
load
data CacheLoadMethodInfo Source #
Instances
((~) * signature (m ()), MonadIO m, IsCache a) => MethodInfo * CacheLoadMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> m () |
Loads the contents of cache
's index into memory.
Since: 2.34
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> CacheType |
|
-> m Cache | Returns: a new |
Creates a new Cache
.
Since: 2.34
setMaxSize
data CacheSetMaxSizeMethodInfo Source #
Instances
((~) * signature (Word32 -> m ()), MonadIO m, IsCache a) => MethodInfo * CacheSetMaxSizeMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the maximum size of the cache.
Since: 2.34
Properties
cacheDir
data CacheCacheDirPropertyInfo Source #
Instances
cacheCacheDir :: AttrLabelProxy "cacheDir" Source #
constructCacheCacheDir :: IsCache o => Text -> IO (GValueConstruct o) Source #
cacheType
data CacheCacheTypePropertyInfo Source #
Instances
cacheCacheType :: AttrLabelProxy "cacheType" Source #
constructCacheCacheType :: IsCache o => CacheType -> IO (GValueConstruct o) Source #