h3ravel/framework

Feat: Integrate Cacheable for cache management

開放

#2 建立於 2025年8月2日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (14 個分叉)auto 404
@h3ravel/cacheFeature Requirementenhancementhelp wantedperformance

倉庫指標

星標
 (22 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Background: Applications need a unified caching layer to improve performance and reduce redundant computations. Integrating Cacheable (or similar) will provide a consistent API for working with different cache backends like memory, Redis, or database.

Tasks:

  • Add Cacheable as dependency.
  • Add your implementation to the framework/cache package directory
  • Implement CacheManager to configure and manage multiple cache stores.
  • Provide drivers for memory and redis out of the box.
  • Add helpers for common operations: put, get, forget, remember.
  • Add support for tagging and TTL (time-to-live).
  • Write unit tests for each driver and helper.
  • Document cache usage with examples.

Acceptance criteria:

  • Developers can configure cache stores in config (memory, redis, etc.).
  • Interface mirrors laravel as much as possible, creating the familiar DX while also adding it own unique twists and turns.
  • Cache.put stores and expires values as expected.
  • Cache.remember fetches from cache or computes and stores if missing.
  • Tests validate behavior across drivers.

Difficulty: medium

貢獻者指南