Download the PHP package stougeiro/cache-contract without Composer
On this page you can find all versions of the php package stougeiro/cache-contract. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stougeiro/cache-contract
More information about stougeiro/cache-contract
Files in stougeiro/cache-contract
Package cache-contract
Short Description Minimal cache contract package defining the essential interfaces for a plug-and-play caching layer. Provides a lightweight CacheInterface with basic operations for storing, retrieving, checking, deleting and clearing cached values in modular PHP applications.
License MIT
Informations about the package cache-contract
Cache Contract
A minimal cache contract that defines only the essential operations for any temporary storage mechanism. It provides a simple, predictable, and pluggable interface so that different implementations can be used interchangeably in modular PHP applications.
✨ Features
-
Minimal and predictable API
A singleCacheInterfacedefining the core operations:has,get,set,deleteeclear. -
Plug-and-play design
Any cache implementation can be swapped without changing application logic. -
Framework-agnostic
Works with any architecture, from micro-frameworks to full-stack applications. - Lightweight by design
No dependencies, no assumptions — just the essential contract.
📦 Installation
Install via Composer:
🔧 Implementations
Below is a list of known implementations maintained by the community.
stougeiro/cache
Repository: https://github.com/stougeiro/cache
🧠 Why?
Because caching should be simple. This package defines the smallest possible contract for a cache layer, allowing developers to implement their own storage strategies — file-based, memory-based, database-backed, distributed, or custom — while keeping a consistent interface across the entire application.
It allows any cache engine to be replaced without impacting the application code, promoting modularity, testability, and flexibility.
🤝 Contributions
Contributions are welcome. Feel free to open issues or submit pull requests.
