summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/llcache.c11
-rw-r--r--content/llcache.h8
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