Join GitHub today
implement open file cache #596
For devices using 10ge connection but not-so-powerful CPU serving static files, the cost of open(2) and close(2) becomes an issue.
Implementing an in-memory cache is one way to address the issue, but doing so does consume memory and therefore cannot be enabled by default.
OTOH a file descriptor cache that shares a file descriptor only when a file is opened more than once is a good approach for the following reasons:
The cache implemented by this PR also have following characteristics:
relates to: #139