NetSurf
Typedefs | Functions
cache-control.h File Reference
#include <libwapcaplet/libwapcaplet.h>
Include dependency graph for cache-control.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct http_cache_control http_cache_control
 

Functions

nserror http_parse_cache_control (const char *header_value, http_cache_control **result)
 Parse an HTTP Cache-Control header value. More...
 
void http_cache_control_destroy (http_cache_control *victim)
 Destroy a cache_control object. More...
 
bool http_cache_control_has_max_age (http_cache_control *cc)
 Determine if a valid max-age directive is present. More...
 
uint32_t http_cache_control_max_age (http_cache_control *cc)
 Get the value of a cache control's max-age. More...
 
bool http_cache_control_no_cache (http_cache_control *cc)
 Get the value of a cache control's no-cache flag. More...
 
bool http_cache_control_no_store (http_cache_control *cc)
 Get the value of a cache control's no-store flag. More...
 

Typedef Documentation

◆ http_cache_control

Definition at line 24 of file cache-control.h.

Function Documentation

◆ http_cache_control_destroy()

void http_cache_control_destroy ( http_cache_control victim)

Destroy a cache_control object.

Parameters
victimObject to destroy

Definition at line 326 of file cache-control.c.

Referenced by llcache_fetch_parse_cache_control().

Here is the caller graph for this function:

◆ http_cache_control_has_max_age()

bool http_cache_control_has_max_age ( http_cache_control cc)

Determine if a valid max-age directive is present.

Parameters
ccObject to inspect
Returns
Whether max-age is valid

Definition at line 332 of file cache-control.c.

References http_cache_control::max_age_valid.

Referenced by llcache_fetch_parse_cache_control().

Here is the caller graph for this function:

◆ http_cache_control_max_age()

uint32_t http_cache_control_max_age ( http_cache_control cc)

Get the value of a cache control's max-age.

Parameters
ccObject to inspect
Returns
Max age, in delta-seconds

Definition at line 338 of file cache-control.c.

References http_cache_control::max_age.

Referenced by llcache_fetch_parse_cache_control().

Here is the caller graph for this function:

◆ http_cache_control_no_cache()

bool http_cache_control_no_cache ( http_cache_control cc)

Get the value of a cache control's no-cache flag.

Parameters
ccObject to inspect
Returns
Whether caching is forbidden

Definition at line 344 of file cache-control.c.

References http_cache_control::no_cache.

Referenced by llcache_fetch_parse_cache_control().

Here is the caller graph for this function:

◆ http_cache_control_no_store()

bool http_cache_control_no_store ( http_cache_control cc)

Get the value of a cache control's no-store flag.

Parameters
ccObject to inspect
Returns
Whether persistent caching is forbidden

Definition at line 350 of file cache-control.c.

References http_cache_control::no_store.

Referenced by llcache_fetch_parse_cache_control().

Here is the caller graph for this function:

◆ http_parse_cache_control()

nserror http_parse_cache_control ( const char *  header_value,
http_cache_control **  result 
)

Parse an HTTP Cache-Control header value.

Parameters
header_valueHeader value to parse
resultPointer to location to receive result
Returns
NSERROR_OK on success, NSERROR_NOMEM on memory exhaustion, appropriate error otherwise

Definition at line 235 of file cache-control.c.

References check_duplicates(), http__item_list_parse, http__parse_directive(), http__skip_LWS(), http_directive_list_destroy(), http_directive_list_find_item(), http_cache_control::max_age, http_cache_control::max_age_valid, http_cache_control::no_cache, http_cache_control::no_store, NSERROR_NOMEM, NSERROR_NOT_FOUND, NSERROR_OK, parse_max_age(), and result.

Referenced by llcache_fetch_parse_cache_control().

Here is the call graph for this function:
Here is the caller graph for this function: