Top | ![]() |
![]() |
![]() |
![]() |
|
camel_data_cache_new () |
const |
camel_data_cache_get_path () |
|
camel_data_cache_set_path () |
|
camel_data_cache_get_expire_enabled () |
|
camel_data_cache_set_expire_enabled () |
|
camel_data_cache_set_expire_age () |
|
camel_data_cache_set_expire_access () |
|
camel_data_cache_add () |
|
camel_data_cache_get () |
|
camel_data_cache_remove () |
|
camel_data_cache_get_filename () |
|
camel_data_cache_clear () |
CamelDataCache * camel_data_cache_new (const
,gchar *path);
GError **error
Create a new data cache.
constgchar * camel_data_cache_get_path ();
CamelDataCache *cdc
Returns the path to the data cache.
Since: 2.32
void camel_data_cache_set_path (,
CamelDataCache *cdcconst
);gchar *path
Sets the path to the data cache.
Since: 2.32
gboolean camel_data_cache_get_expire_enabled ();
CamelDataCache *cdc
Gets whether expire of cache data is enabled.
This is a complementary property for camel_data_cache_set_expire_age()
and camel_data_cache_set_expire_access()
, which allows to disable expiry
without touching the two values. Having expire enabled, but not have set
any of the two times, still behaves like not having expiry enabled.
Since: 3.24
void camel_data_cache_set_expire_enabled (,
CamelDataCache *cdc);
gboolean expire_enabled
Sets whether expire of cache data is enabled.
This is a complementary property for camel_data_cache_set_expire_age()
and camel_data_cache_set_expire_access()
, which allows to disable expiry
without touching the two values. Having expire enabled, but not have set
any of the two times, still behaves like not having expiry enabled.
Since: 3.24
void camel_data_cache_set_expire_age (,
CamelDataCache *cdc);
time_t when
Set the cache expiration policy for aged entries.
Items in the cache older than when
seconds may be
flushed at any time. Items are expired in a lazy
manner, so it is indeterminate when the items will
physically be removed.
Note you can set both an age and an access limit. The age acts as a hard limit on cache entries.
void camel_data_cache_set_expire_access (,
CamelDataCache *cdc);
time_t when
Set the cache expiration policy for access times.
Items in the cache which haven't been accessed for when
seconds may be expired at any time. Items are expired in a lazy
manner, so it is indeterminate when the items will
physically be removed.
Note you can set both an age and an access limit. The age acts as a hard limit on cache entries.
GIOStream * camel_data_cache_add (,
CamelDataCache *cdcconst
,gchar *pathconst
,gchar *key);
GError **error
Add a new item to the cache, returning a
The key and the path combine to form a unique key used to store the item.
Potentially, expiry processing will be performed while this call is executing.
The returned g_object_unref()
GIOStream * camel_data_cache_get (,
CamelDataCache *cdcconst
,gchar *pathconst
,gchar *key);
GError **error
Lookup an item in the cache. If the item exists, a
The returned g_object_unref()
gint camel_data_cache_remove (,
CamelDataCache *cdcconst
,gchar *pathconst
,gchar *key);
GError **error
Remove/expire a cache item.
gchar * camel_data_cache_get_filename (,
CamelDataCache *cdcconst
,gchar *pathconst
);gchar *key
Lookup the filename for an item in the cache
cdc |
A |
|
path |
Path to the (sub) cache the item exists in. |
|
key |
Key for the cache item. |
Since: 2.26
void camel_data_cache_clear (,
CamelDataCache *cdcconst
);gchar *path
Clear cache's content in path
.
Since: 3.2