nginx/src/http/ngx_http_cache.h


/*
 * Copyright (C) Igor Sysoev
 * Copyright (C) Nginx, Inc.
 */


#ifndef _NGX_HTTP_CACHE_H_INCLUDED_
#define _NGX_HTTP_CACHE_H_INCLUDED_


#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>


#define NGX_HTTP_CACHE_MISS
#define NGX_HTTP_CACHE_BYPASS
#define NGX_HTTP_CACHE_EXPIRED
#define NGX_HTTP_CACHE_STALE
#define NGX_HTTP_CACHE_UPDATING
#define NGX_HTTP_CACHE_REVALIDATED
#define NGX_HTTP_CACHE_HIT
#define NGX_HTTP_CACHE_SCARCE

#define NGX_HTTP_CACHE_KEY_LEN
#define NGX_HTTP_CACHE_ETAG_LEN
#define NGX_HTTP_CACHE_VARY_LEN

#define NGX_HTTP_CACHE_VERSION


ngx_http_cache_valid_t;


ngx_http_file_cache_node_t;


struct ngx_http_cache_s {};


ngx_http_file_cache_header_t;


ngx_http_file_cache_sh_t;


struct ngx_http_file_cache_s {};


ngx_int_t ngx_http_file_cache_new(ngx_http_request_t *r);
ngx_int_t ngx_http_file_cache_create(ngx_http_request_t *r);
void ngx_http_file_cache_create_key(ngx_http_request_t *r);
ngx_int_t ngx_http_file_cache_open(ngx_http_request_t *r);
ngx_int_t ngx_http_file_cache_set_header(ngx_http_request_t *r, u_char *buf);
void ngx_http_file_cache_update(ngx_http_request_t *r, ngx_temp_file_t *tf);
void ngx_http_file_cache_update_header(ngx_http_request_t *r);
ngx_int_t ngx_http_cache_send(ngx_http_request_t *);
void ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf);
time_t ngx_http_file_cache_valid(ngx_array_t *cache_valid, ngx_uint_t status);

char *ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
    void *conf);
char *ngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
    void *conf);


extern ngx_str_t  ngx_http_cache_status[];


#endif /* _NGX_HTTP_CACHE_H_INCLUDED_ */