Skip to content

Commit afb7daa

Browse files
committed
Update cache
1 parent 41190a2 commit afb7daa

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cache/cache.c

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
unsigned long cur_time = 0; /* Used to update timestamp */
44

5+
/* Helper functions prototypes */
6+
static int get_write_idx(cache_line_t *cache);
7+
static size_t hash_func(char *str);
8+
9+
10+
511
/*
612
* cache_init - initialize proxy's cache by allocating
713
* memory for it and initializing it to zeros.

cache/cache.h

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ typedef struct cache_line {
1717
int valid_bit; /* Valid bit */
1818
} cache_line_t;
1919

20-
/* Helper functions prototypes */
21-
static int get_write_idx(cache_line_t *cache);
22-
static size_t hash_func(char *str);
23-
2420
/* Functions prototypes */
2521
void cache_init(cache_line_t **cache_p);
2622
void write_cache(cache_line_t *cache, char *cache_buf, int object_size, size_t hash);

0 commit comments

Comments
 (0)