EFileCache

## EFileCache EFileCache |

## Synopsis

                        EFileCachePrivate;
                        EFileCache;
    EFileCache *        e_file_cache_new                    (const gchar *filename);
    gboolean            e_file_cache_remove                 (EFileCache *cache);
    gboolean            e_file_cache_clean                  (EFileCache *cache);
    const gchar *       e_file_cache_get_object             (EFileCache *cache,
                                                             const gchar *key);
    GSList *            e_file_cache_get_objects            (EFileCache *cache);
    GSList *            e_file_cache_get_keys               (EFileCache *cache);
    gboolean            e_file_cache_add_object             (EFileCache *cache,
                                                             const gchar *key,
                                                             const gchar *value);
    gboolean            e_file_cache_replace_object         (EFileCache *cache,
                                                             const gchar *key,
                                                             const gchar *new_value);
    gboolean            e_file_cache_remove_object          (EFileCache *cache,
                                                             const gchar *key);
    void                e_file_cache_freeze_changes         (EFileCache *cache);
    void                e_file_cache_thaw_changes           (EFileCache *cache);
    const gchar *       e_file_cache_get_filename           (EFileCache *cache);

## Object Hierarchy

      GObject
       +----EFileCache

## Properties

      "filename"                 gchar*                : Read / Write / Construct Only

## Description

## Details

### EFileCachePrivate

    typedef struct _EFileCachePrivate EFileCachePrivate;

### EFileCache

    typedef struct _EFileCache EFileCache;

### e_file_cache_new ()

    EFileCache *        e_file_cache_new                    (const gchar *filename);

Creates a new EFileCache object, which implements a cache of objects, very useful for remote backends.

`filename` : | filename where the cache is kept.
Returns : | The newly created object.

### e_file_cache_remove ()

    gboolean            e_file_cache_remove                 (EFileCache *cache);

Remove the cache from disk.

`cache` : | A EFileCache object.
Returns : | TRUE if successful, FALSE otherwise.

### e_file_cache_clean ()

    gboolean            e_file_cache_clean                  (EFileCache *cache);

Clean up the cache's contents.

`cache` : | A EFileCache object.
Returns : | TRUE if successful, FALSE otherwise.

### e_file_cache_get_object ()

    const gchar *       e_file_cache_get_object             (EFileCache *cache,
                                                             const gchar *key);

`cache` : |
`key` : |
Returns : |

### e_file_cache_get_objects ()

    GSList *            e_file_cache_get_objects            (EFileCache *cache);

`cache` : |
Returns : |

### e_file_cache_get_keys ()

    GSList *            e_file_cache_get_keys               (EFileCache *cache);

`cache` : |
Returns : |

### e_file_cache_add_object ()

    gboolean            e_file_cache_add_object             (EFileCache *cache,
                                                             const gchar *key,
                                                             const gchar *value);

`cache` : |
`key` : |
`value` : |
Returns : |

### e_file_cache_replace_object ()

    gboolean            e_file_cache_replace_object         (EFileCache *cache,
                                                             const gchar *key,
                                                             const gchar *new_value);

`cache` : |
`key` : |
`new_value` : |
Returns : |

### e_file_cache_remove_object ()

    gboolean            e_file_cache_remove_object          (EFileCache *cache,
                                                             const gchar *key);

`cache` : |
`key` : |
Returns : |

### e_file_cache_freeze_changes ()

    void                e_file_cache_freeze_changes         (EFileCache *cache);

Disables temporarily all writes to disk for the given cache object.

`cache` : | An EFileCache object.

### e_file_cache_thaw_changes ()

    void                e_file_cache_thaw_changes           (EFileCache *cache);

Enables again writes to disk on every change.

`cache` : | An EFileCache object.

### e_file_cache_get_filename ()

    const gchar *       e_file_cache_get_filename           (EFileCache *cache);

Gets the name of the file where the cache is being stored.

`cache` : | A `EFileCache` object.
Returns : | The name of the cache.

## Property Details

### The `"filename"` property

      "filename"                 gchar*                : Read / Write / Construct Only

Default value: ""