20250423
This commit is contained in:
7
cache.h
7
cache.h
@@ -18,6 +18,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
@@ -25,7 +29,7 @@
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MAXIPSET_ 10240
|
||||
#define MAXIPSET_ 65535
|
||||
#define MAXIPLEN 32
|
||||
|
||||
#define CACHE_TTL 180 // 设定缓存的存活时间为 600 秒 (10 分钟)
|
||||
@@ -54,5 +58,6 @@ extern int append_string_to_file(const char *filepath, const char *str);
|
||||
extern int read_file_to_array(const char *filepath, char cn_ip[MAXIPSET_][MAXIPLEN], int *line_count);
|
||||
|
||||
extern int file_exists_access(const char *filepath);
|
||||
extern int truncate_file(const char *path);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user