Commit bcbdb75
committed
feat: multi-store architecture with per-store config, persistence, and APIs
- StoreManager: create/drop/list named stores with independent config
- Per-store eviction policy, memory limit, TTL, cuckoo filter, persistence
- Store config is immutable after creation (drop and recreate to change)
- stores.json registry: runtime-created stores survive restarts
- Per-store persistence directories: {data_dir}/stores/{name}/
- HTTP APIs: GET/POST /api/stores, GET/DELETE /api/stores/{name},
GET/PUT/DELETE /api/stores/{name}/cache/{key}
- RESP: SELECT <store>, STORES commands with per-connection state
- Existing /api/cache/{key} and RESP commands unchanged (default store)
- Store-aware replication: events include store name, routed correctly
- Fix: auto snapshots now fire on schedule (was stub)
- Fix: auto AOF compaction now fires when size exceeds limit (was stub)
- Fix: corrupt AOF lines skipped instead of blocking startup
- Env var overrides: HYPERCACHE_DEFAULT_MEMORY, HYPERCACHE_DEFAULT_TTL,
HYPERCACHE_DEFAULT_EVICTION, HYPERCACHE_DEFAULT_CUCKOO,
HYPERCACHE_MAX_STORES, HYPERCACHE_CUCKOO_FILTER_FPP,
HYPERCACHE_PERSISTENCE_ENABLED, HYPERCACHE_PERSISTENCE_STRATEGY
- Default TTL changed to 0 (infinite); only default store ships OOTB
- Updated README, config YAML, and architecture docs1 parent b927d1d commit bcbdb75
10 files changed
Lines changed: 1134 additions & 185 deletions
File tree
- cmd/hypercache
- configs
- docs/architecture
- internal
- network/resp
- persistence
- storage
- pkg/config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
474 | | - | |
475 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
476 | 500 | | |
477 | 501 | | |
478 | 502 | | |
479 | 503 | | |
480 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
481 | 507 | | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
| 508 | + | |
489 | 509 | | |
490 | | - | |
491 | | - | |
492 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
493 | 521 | | |
494 | | - | |
| 522 | + | |
495 | 523 | | |
496 | | - | |
497 | | - | |
498 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
499 | 528 | | |
500 | 529 | | |
501 | 530 | | |
| |||
600 | 629 | | |
601 | 630 | | |
602 | 631 | | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
608 | 635 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
| 636 | + | |
| 637 | + | |
614 | 638 | | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
| 639 | + | |
| 640 | + | |
619 | 641 | | |
620 | 642 | | |
621 | 643 | | |
| |||
0 commit comments