diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-04-16 20:42:10 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-04-16 20:42:10 +0000 |
commit | 44552e74924519702ba96c01259c601ec4dd4113 (patch) | |
tree | f25cb1f82d2b9b7afb349014c69dcce9b6ca67a8 | |
parent | 9c1ff9fbc1042402610702f826b7a7ed282e98df (diff) | |
download | netsurf-44552e74924519702ba96c01259c601ec4dd4113.tar.gz netsurf-44552e74924519702ba96c01259c601ec4dd4113.tar.bz2 |
Provide API to invalidate llcache object cache control data
svn path=/trunk/netsurf/; revision=10411
-rw-r--r-- | content/llcache.c | 11 | ||||
-rw-r--r-- | content/llcache.h | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/content/llcache.c b/content/llcache.c index a6ef49370..2d8472b0c 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -398,6 +398,17 @@ nserror llcache_handle_force_stream(llcache_handle *handle) } /* See llcache.h for documentation */ +nserror llcache_handle_invalidate_cache_data(llcache_handle *handle) +{ + if (handle->object != NULL && handle->object->fetch.fetch == NULL) { + memset(&handle->object->cache, 0, + sizeof(llcache_cache_control)); + } + + return NSERROR_OK; +} + +/* See llcache.h for documentation */ const char *llcache_handle_get_url(const llcache_handle *handle) { return handle->object != NULL ? handle->object->url : NULL; diff --git a/content/llcache.h b/content/llcache.h index 3c965d3dc..3a1e32ca9 100644 --- a/content/llcache.h +++ b/content/llcache.h @@ -232,6 +232,14 @@ nserror llcache_handle_abort(llcache_handle *handle); nserror llcache_handle_force_stream(llcache_handle *handle); /** + * Invalidate cache data for a low-level cache object + * + * \param handle Handle to invalidate + * \return NSERROR_OK on success, appropriate error otherwise + */ +nserror llcache_handle_invalidate_cache_data(llcache_handle *handle); + +/** * Retrieve the post-redirect URL of a low-level cache object * * \param handle Handle to retrieve URL from |