cache-content-type

JSON →
library 2.1.0 ·javascript
verified Jun 7, 2026

A Node.js library that creates a full Content-Type header string from a MIME type or file extension, with LRU caching of results. Version 1.0+ uses the same underlying database as mime-types but adds an in-memory cache (default cache size 100) to avoid repeated lookups. Release cadence is low, updated primarily for dependency bumps and Node.js version support. Differentiator: provides cached content-type lookups, improving performance when the same extensions are queried multiple times (e.g., in HTTP servers).