summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/content/content.h b/content/content.h
index f2f3f4de2..ae43b933e 100644
--- a/content/content.h
+++ b/content/content.h
@@ -71,7 +71,6 @@
struct bitmap;
struct box;
struct browser_window;
-struct cache_data;
struct content;
struct fetch;
struct object_params;
@@ -126,6 +125,19 @@ union content_msg_data {
} ssl;
};
+struct cache_data {
+ time_t req_time; /**< Time of request */
+ time_t res_time; /**< Time of response */
+ time_t date; /**< Date: response header */
+ time_t expires; /**< Expires: response header */
+#define INVALID_AGE -1
+ int age; /**< Age: response header */
+ int max_age; /**< Max-age Cache-control parameter */
+ bool no_cache; /**< no-cache Cache-control parameter */
+ char *etag; /**< Etag: response header */
+ time_t last_modified; /**< Last-Modified: response header */
+};
+
/** Linked list of users of a content. */
struct content_user
{
@@ -208,7 +220,7 @@ struct content {
* was fetched using a simple GET, has not expired, and may be
* shared between users. */
bool fresh;
- struct cache_data *cache_data; /**< Cache control data */
+ struct cache_data cache_data; /**< Cache control data */
unsigned int time; /**< Creation time, if TYPE_UNKNOWN,
LOADING or READY,
otherwise total time. */