Skip to content

Commit 0149663

Browse files
simllllclaude
andauthored
Simplify README and add storage engines table (#9)
* docs(core): simplify README and add storage engines table - Reduce README from 764 to 182 lines - Add clear storage engines comparison table - Remove verbose interface definitions - Consolidate examples for brevity - Keep essential documentation for quick reference * docs: fix redis version from v3.x to v4.x * docs(core): add ADVANCED.md with detailed reference material Move interface definitions, detailed storage configuration examples, @MultiCache in-depth documentation, and error handling patterns to a separate file for advanced users and custom storage implementors. * Simplify README and add storage engines table Updated README to simplify content and included a table for storage engines. * style: apply prettier formatting * docs: update CLAUDE.md to vitest and redis v4.x --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6d4a6c8 commit 0149663

5 files changed

Lines changed: 484 additions & 636 deletions

File tree

.changeset/tiny-schools-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@node-ts-cache/core": patch
3+
---
4+
5+
Simplify README and add storage engines table

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ Always run these checks before committing:
6161
│ └── test/ # Test files
6262
├── storages/ # Storage adapter packages
6363
│ ├── lru/ # LRU cache storage
64-
│ ├── redis/ # Redis storage (redis package v3.x)
64+
│ ├── redis/ # Redis storage (redis package v4.x)
6565
│ ├── redisio/ # Redis storage (ioredis with compression)
6666
│ ├── node-cache/ # node-cache storage
6767
│ └── lru-redis/ # Two-tier LRU + Redis storage
6868
```
6969

7070
## Testing Framework
7171

72-
- Uses Mocha with ts-node ESM loader
72+
- Uses Vitest
7373
- Tests use Node's built-in `assert` module
7474
- Mock Redis instances using `redis-mock` and `ioredis-mock`

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This is a monorepo containing the following packages:
5050

5151
| Package | Version | Description |
5252
| ---------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------ |
53-
| [@node-ts-cache/redis-storage](./storages/redis) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/redis-storage.svg) | Redis storage using `redis` package (v3.x) |
53+
| [@node-ts-cache/redis-storage](./storages/redis) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/redis-storage.svg) | Redis storage using `redis` package (v4.x) |
5454
| [@node-ts-cache/ioredis-storage](./storages/redisio) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/ioredis-storage.svg) | Redis storage using `ioredis` with compression support |
5555
| [@node-ts-cache/node-cache-storage](./storages/node-cache) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/node-cache-storage.svg) | In-memory cache using `node-cache` |
5656
| [@node-ts-cache/lru-storage](./storages/lru) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/lru-storage.svg) | LRU cache with automatic eviction |
@@ -96,7 +96,7 @@ For detailed documentation, see the [main package README](./ts-cache/README.md).
9696
| **FsJsonStorage** | Async | Persistent local cache | File-based, survives restarts |
9797
| **NodeCacheStorage** | Sync | Production single-instance | TTL support, multi-ops |
9898
| **LRUStorage** | Sync | Memory-constrained apps | Auto-eviction, size limits |
99-
| **RedisStorage** | Async | Distributed systems | Shared cache, legacy redis |
99+
| **RedisStorage** | Async | Distributed systems | Shared cache, redis v4 |
100100
| **RedisIOStorage** | Async | Distributed systems | Compression, modern ioredis |
101101
| **LRUWithRedisStorage** | Async | High-performance distributed | Local + remote tiers |
102102

0 commit comments

Comments
 (0)