Provide API to invalidate llcache object cache control data

svn path=/trunk/netsurf/; revision=10411
This commit is contained in:
John Mark Bell 2010-04-16 20:42:10 +00:00
parent 9c1ff9fbc1
commit 44552e7492
2 changed files with 19 additions and 0 deletions

View File

@ -397,6 +397,17 @@ nserror llcache_handle_force_stream(llcache_handle *handle)
return NSERROR_OK;
}
/* 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)
{

View File

@ -231,6 +231,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
*