# symfony/cache-contracts

Generic abstractions related to caching

Repository: https://github.com/symfony/cache-contracts
Canonical: https://ross.abutalabs.com/products/cache-contracts
Homepage: https://symfony.com
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, abstractions, contracts, decoupling, interfaces, interoperability, standards, symfony-contracts
Last push: 2026-06-27T21:46:29+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 78, longevity 100
- inputs: {"age_days": 2655, "days_push": 67, "days_rel": 67, "gap_med": 52, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2365, forks 6 (observed 2026-08-28T04:06:41.532843+00:00)

## What it is
A set of PHP interfaces and abstractions for caching, extracted from the Symfony framework's cache component. It lets libraries depend on stable, battle-tested caching semantics without coupling to a specific Symfony cache implementation.

## Use cases
- decouple my PHP library from specific cache implementations
- type-hint against a standard caching interface in PHP
- make my package interoperable with Symfony cache
- define cache semantics for third-party cache adapters
- avoid depending on the full Symfony framework just for caching

## When to choose
- you are building a PHP library that needs caching without hard dependencies
- you want interoperability with Symfony's cache component ecosystem
- you need stable interfaces to program against rather than implementations

## When to avoid
- you need an actual cache implementation rather than interfaces
- your project does not use PHP
- you want a framework-agnostic PSR-6/PSR-16 solution only

## Facets
- artifact type: library
- maturity: stable
- function: caching
- domain: developer-tools, web-development
- platform: php
- tags: abstractions, interfaces, interoperability, symfony-contracts, decoupling

## Member repositories
- symfony/cache-contracts (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:41.532843+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:36:00.606744+00:00, confidence not recorded.
  - readme: https://github.com/symfony/cache-contracts (fetched 2026-08-28T04:06:41.532843+00:00, sha a811c18eb5cc)
  - homepage: https://symfony.com (fetched 2026-08-29T10:16:29.095862+00:00, sha 68595089eb73)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T10:16:29.098308+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/contributing/community/releases.html (fetched 2026-08-29T10:16:29.100058+00:00, sha 43441105b0a6)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T10:16:29.101820+00:00, sha 2fd410222cfe)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T10:16:29.103770+00:00, sha a84b8a49342e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
