[stat_cache] FAM: ignore event with no valid match
[lighttpd.git] / src / stat_cache.h
blobd533d08b140f13177b5f4e566bd045abf6c8e4c1
1 #ifndef _FILE_CACHE_H_
2 #define _FILE_CACHE_H_
3 #include "first.h"
5 #include "base_decls.h"
6 #include "buffer.h"
7 #include "etag.h"
9 #include <sys/types.h>
10 #include <sys/time.h>
11 #include <sys/stat.h>
13 struct stat_cache; /* declaration */
15 typedef struct {
16 buffer *name;
17 buffer *etag;
19 struct stat st;
21 time_t stat_ts;
23 #ifdef HAVE_FAM_H
24 int dir_version;
25 #endif
27 buffer *content_type;
28 } stat_cache_entry;
30 __attribute_cold__
31 int stat_cache_choose_engine (server *srv, const buffer *stat_cache_string);
33 __attribute_cold__
34 struct stat_cache *stat_cache_init(server *srv);
36 __attribute_cold__
37 void stat_cache_free(struct stat_cache *fc);
39 const buffer * stat_cache_mimetype_by_ext(const connection *con, const char *name, size_t nlen);
40 const buffer * stat_cache_content_type_get(server *srv, connection *con, const buffer *name, stat_cache_entry *sce);
41 const buffer * stat_cache_etag_get(stat_cache_entry *sce, etag_flags_t flags);
42 handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_cache_entry **sce);
43 int stat_cache_path_contains_symlink(server *srv, buffer *name);
44 int stat_cache_open_rdonly_fstat (buffer *name, struct stat *st, int symlinks);
46 int stat_cache_trigger_cleanup(server *srv);
47 #endif