comphp/cache

Simple driver-based caching support for PHP applications.

Maintainers

Package info

github.com/commonphp/cache

pkg:composer/comphp/cache

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.3 2026-05-17 23:04 UTC

This package is auto-updated.

Last update: 2026-05-17 23:06:09 UTC


README

CommonPHP Cache provides simple driver-based caching support for CommonPHP applications. It defines cache contracts and manager behavior while allowing storage implementations such as memory, filesystem, database, Redis, or Symfony-backed cache drivers to be plugged in separately.

The package is intended to make common cache operations easy to use while keeping storage details behind focused drivers.

Requirements

  • PHP ^8.5
  • comphp/runtime:^0.3
  • psr/simple-cache if PSR-16 support is enabled

Installation

Once this package is available through your Composer repositories, install it with:

composer require comphp/cache

Usage

<?php

// TODO: Write usage

Package Notes

This package should expose a simple cache API backed by driver implementations. Concrete storage integrations such as Symfony Cache, filesystem cache, database cache, Redis, or Memcached should live in driver packages.

Error Handling

Driver errors, invalid keys, serialization failures, and storage failures should throw CommonPHP cache exceptions rather than returning ambiguous false values.

Documentation

License

MIT. See LICENSE.md.