{"repo":"jkelin/cache-sqlite-lru-ttl","free":true,"listed":false,"github":"https://github.com/jkelin/cache-sqlite-lru-ttl","clone":"git clone https://github.com/jkelin/cache-sqlite-lru-ttl.git","description":"SQLite cache with LRU and TTL eviction","language":"TypeScript","stars":16,"topics":["cache","lru-cache","sqlite","ttl-cache"],"license":null,"category":"databases-storage","readme_excerpt":"SQLite cache with LRU and TTL eviction SQLite is great for high-performance local cache. This library is perfectly viable for caching strings, objects or whole files. Caching files in SQLite is generally faster than storing them in a filesystem. This library tries to have sane defaults and features: - TTL eviction mechanism which allows you to set maximum datetime to expire an item - LRU eviction mechanism that enforces that no more than maxItems will be cached based on least recent get - Optional value compression with gzip - Values encoded with CBOR which is like JSON, but is binary and serializes Buffer and Date - Inspired by node-cache-manager-sqlite but with easier configuration, TypeScript, LRU and compression - Make sure to call await cache.close() during graceful shutdown of your application to ensure SQLite is properly persisted to disk - Supports both Bun and Node.js Basic usage More usage","default_branch":null,"files":null,"tree":[],"storefront":"/r/jkelin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jkelin/cache-sqlite-lru-ttl/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}