h3ravel/framework

Feat: Integrate Cacheable for cache management

Aperta

#2 aperta il 2 ago 2025

 (0 commenti) (0 reazioni) (0 assegnatari)TypeScript (14 fork)auto 404
@h3ravel/cacheFeature Requirementenhancementhelp wantedperformance

Metriche repository

Star
 (22 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor