Skip to content

Commit 4c1d30c

Browse files
authored
rm deprecated comment
1 parent 8cd32ab commit 4c1d30c

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

http/server/FileCache.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
/*
55
* FileCache — Enhanced File Cache for libhv HTTP server
66
*
7-
* Features:
8-
* 1. Configurable max_header_length (default 4096, tunable per-instance)
9-
* 2. prepend_header() returns bool to report success/failure
10-
* 3. Exposes header/buffer metrics via accessors
11-
* 4. Fixes stat() name collision in is_modified()
12-
* 5. max_cache_num / max_file_size configurable at runtime
13-
* 6. Reserved header space can be tuned per-instance
14-
* 7. Source-level API compatible; struct layout differs from original (no ABI/layout compatibility)
157
*/
168

179
#include <memory>
@@ -42,7 +34,6 @@ typedef struct file_cache_s {
4234
char etag[64];
4335
std::string content_type;
4436

45-
// --- new: expose header metrics ---
4637
int header_reserve; // reserved bytes before file content
4738
int header_used; // actual bytes used by prepend_header
4839

@@ -114,7 +105,6 @@ typedef std::shared_ptr<file_cache_t> file_cache_ptr;
114105

115106
class HV_EXPORT FileCache : public hv::LRUCache<std::string, file_cache_ptr> {
116107
public:
117-
// --- configurable parameters (were hardcoded macros before) ---
118108
int stat_interval; // seconds between stat() checks
119109
int expired_time; // seconds before cache entry expires
120110
int max_header_length; // reserved header bytes per entry
@@ -143,13 +133,11 @@ class HV_EXPORT FileCache : public hv::LRUCache<std::string, file_cache_ptr> {
143133
bool Close(const char* filepath);
144134
void RemoveExpiredFileCache();
145135

146-
// --- new: getters ---
147136
int GetMaxHeaderLength() const { return max_header_length; }
148137
int GetMaxFileSize() const { return max_file_size; }
149138
int GetStatInterval() const { return stat_interval; }
150139
int GetExpiredTime() const { return expired_time; }
151140

152-
// --- new: setters ---
153141
void SetMaxHeaderLength(int len) { max_header_length = len < 0 ? 0 : len; }
154142
void SetMaxFileSize(int size) { max_file_size = size < 1 ? 1 : size; }
155143

0 commit comments

Comments
 (0)