Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype Cache = Cache (ManagedPtr Cache)
- class (GObject o, IsDescendantOf Cache o) => IsCache o
- toCache :: (MonadIO m, IsCache o) => o -> m Cache
- noCache :: Maybe Cache
- cacheClear :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- cacheDump :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- cacheFlush :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- cacheGetMaxSize :: (HasCallStack, MonadIO m, IsCache a) => a -> m Word32
- cacheLoad :: (HasCallStack, MonadIO m, IsCache a) => a -> m ()
- cacheNew :: (HasCallStack, MonadIO m) => Maybe Text -> CacheType -> m Cache
- cacheSetMaxSize :: (HasCallStack, MonadIO m, IsCache a) => a -> Word32 -> m ()
- constructCacheCacheDir :: IsCache o => Text -> IO (GValueConstruct o)
- getCacheCacheDir :: (MonadIO m, IsCache o) => o -> m (Maybe Text)
- constructCacheCacheType :: IsCache o => CacheType -> IO (GValueConstruct o)
- getCacheCacheType :: (MonadIO m, IsCache o) => o -> m CacheType
Exported types
Memory-managed wrapper type.
Instances
GObject Cache Source # | |
Defined in GI.Soup.Objects.Cache gobjectType :: IO GType # | |
HasParentTypes Cache Source # | |
Defined in GI.Soup.Objects.Cache | |
type ParentTypes Cache Source # | |
Defined in GI.Soup.Objects.Cache |
class (GObject o, IsDescendantOf Cache o) => IsCache o Source #
Instances
(GObject o, IsDescendantOf Cache o) => IsCache o Source # | |
Defined in GI.Soup.Objects.Cache |
Methods
clear
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> m () |
Will remove all entries in the cache
plus all the cache files.
Since: 2.34
dump
:: (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
:: (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
:: (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
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> m () |
Loads the contents of cache
's index into memory.
Since: 2.34
new
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> CacheType |
|
-> m Cache | Returns: a new |
Creates a new Cache
.
Since: 2.34
setMaxSize
:: (HasCallStack, MonadIO m, IsCache a) | |
=> a |
|
-> Word32 |
|
-> 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