File Cache
Learning Focus
By the end of this lesson you will understand how OpenLiteSpeed's file cache works and when it helps performance.
What File Cache Does
The server can keep frequently accessed file metadata and content in memory, reducing repeated disk lookups on busy sites. Instead of reading from disk every time, the server serves from its internal cache.
When File Cache Helps
| Scenario | Benefit |
|---|---|
| High-traffic static sites | Reduces disk I/O dramatically |
| Shared hosting with slow storage | Compensates for storage latency |
| Sites with many small files | Reduces filesystem overhead |
When It May Not Help
- Sites with very few assets
- Servers with fast NVMe storage (disk is already fast)
- Very large files that do not fit in cache
Configuration
File cache behavior is controlled in Server Configuration → Tuning in WebAdmin. The key setting determines how much memory is allocated for file metadata and content caching.
Key Takeaways
- File cache keeps frequently accessed files in memory to reduce disk I/O.
- Most useful for busy sites or servers with slower storage.
- The server manages cache automatically — manual tuning is usually unnecessary.
What's Next
- Continue to Sendfile Optimization for kernel-level file transfer.