From 8282253a5415263e2385d47d9416a611a00eea0f Mon Sep 17 00:00:00 2001 From: James Bursa Date: Tue, 3 Jun 2008 01:10:46 +0000 Subject: Move struct cache_data from fetch to content as it is no longer needed by fetch. Make it a member instead of pointer in struct content. svn path=/trunk/netsurf/; revision=4246 --- content/content.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'content/content.h') 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. */ -- cgit v1.2.3