sw-cache

sw-cache

Synopsis

void                sw_cache_save                       (SwService *service,
                                                         const gchar *query,
                                                         GHashTable *params,
                                                         SwSet *set);
SwSet *             sw_cache_load                       (SwService *service,
                                                         const gchar *query,
                                                         GHashTable *params,
                                                         SwSet* (*set_constr) ());
void                sw_cache_drop                       (SwService *service,
                                                         const gchar *query,
                                                         GHashTable *params);
void                sw_cache_drop_all                   (SwService *service);

Description

Details

sw_cache_save ()

void                sw_cache_save                       (SwService *service,
                                                         const gchar *query,
                                                         GHashTable *params,
                                                         SwSet *set);

Cache the items in set to disk.

service :

The service the item set is for

query :

The query that this cache represents

params :

A set of parameters (strings) that can be used by the service to differentiate between different service functionality

set :

The set of items to cache

sw_cache_load ()

SwSet *             sw_cache_load                       (SwService *service,
                                                         const gchar *query,
                                                         GHashTable *params,
                                                         SwSet* (*set_constr) ());

Load the cache for service from disk, returning a SwSet if there was a cache.

service :

The service to read the cache for

query :

The query for this cache

params :

A set of parameters (strings) that can be used by the service to differentiate between different service functionality

sw_cache_drop ()

void                sw_cache_drop                       (SwService *service,
                                                         const gchar *query,
                                                         GHashTable *params);

Free the cache for service from disk.

service :

The service to read the cache for

query :

The query for this cache

params :

A set of parameters (strings) that can be used by the service to differentiate between different service functionality

sw_cache_drop_all ()

void                sw_cache_drop_all                   (SwService *service);

Free all cached data for service.

service :

a valid SwService