# php-fig/cache

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/php-fig-cache).**

5,192 stars · 46 forks · PHP · MIT

## Links

- GitHub: https://github.com/php-fig/cache
- awesome-repositories: https://awesome-repositories.com/repository/php-fig-cache.md

## Description

This project is a cache abstraction layer and interface standard for PHP, specifically defining the PSR-6 caching specification. It establishes a consistent set of type definitions and contracts for cache items and pools to ensure interoperability between different PHP libraries.

The specification prevents vendor lock-in by separating high-level caching logic from low-level storage implementations. This allows different caching backends to be swapped without requiring changes to the application code.

The project focuses on PHP cache standardization and library interoperability through the use of common method signatures and type-safe definitions. This creates a vendor-agnostic caching layer that enables multiple storage providers to remain interchangeable.

## Tags

### Programming Languages & Runtimes

- [Caching Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/php-standard-interface-implementations/caching-interfaces.md) — Implements standardized PHP-FIG interfaces for key-value data caching to ensure interoperability. ([source](https://github.com/php-fig/cache#readme))
- [PHP Interoperability Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/php-interoperability-libraries.md) — Creates PHP packages that can share cache implementations without requiring specific third-party providers.

### DevOps & Infrastructure

- [Caching Layers](https://awesome-repositories.com/f/devops-infrastructure/caching-layers.md) — Provides a specification that separates high-level caching logic from low-level storage implementations.

### Software Engineering & Architecture

- [Contract-Driven Execution](https://awesome-repositories.com/f/software-engineering-architecture/contract-driven-execution.md) — Uses standardized interfaces to ensure consistent caching behavior and interchangeability across different PHP libraries.
- [Caching Specification Layers](https://awesome-repositories.com/f/software-engineering-architecture/execution-engines/backend-agnostic-execution-layers/caching-specification-layers.md) — Establishes a uniform API layer to isolate the cache storage engine from the consumer.
- [Interoperability Specifications](https://awesome-repositories.com/f/software-engineering-architecture/interface-driven-validation/interoperability-specifications.md) — Defines common method signatures to ensure caching implementations remain interchangeable across libraries.
- [Interoperable Cache Contracts](https://awesome-repositories.com/f/software-engineering-architecture/interoperable-cache-contracts.md) — Provides a consistent set of type definitions that allows different caching backends to be swapped.
- [Interoperable Interface Contracts](https://awesome-repositories.com/f/software-engineering-architecture/interoperable-interface-contracts.md) — Establishes strict type definitions for cache pools and items to enable backend interoperability.
- [Storage Abstraction Layers](https://awesome-repositories.com/f/software-engineering-architecture/storage-abstraction-layers.md) — Implements architectural patterns that decouple application caching logic from specific storage backend implementations.
- [Storage Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/storage-abstractions.md) — Provides interfaces that decouple application logic from specific cache storage implementations.
- [Vendor-Agnostic Caching Patterns](https://awesome-repositories.com/f/software-engineering-architecture/vendor-agnostic-caching-patterns.md) — Implements a caching layer that prevents dependency on a specific storage provider using unified contracts.
- [Type-Safe Cache Definitions](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/type-safe-state-definitions/type-safe-model-definitions/type-safe-cache-definitions.md) — Standardizes the retrieval and wrapping of cached data using a consistent, type-safe object interface.
- [Type-Safe Cache Pool Definitions](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/type-safe-state-definitions/type-safe-model-definitions/type-safe-cache-pool-definitions.md) — Provides a consistent, type-safe interface for cache collections across various storage providers.
- [Standardized Data Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/standardized-data-wrappers.md) — Wraps cached data in a consistent item interface to unify how values are retrieved.

### Data & Databases

- [Application Cache Management](https://awesome-repositories.com/f/data-databases/application-cache-management.md) — Provides a standardized way to connect PHP applications to various cache storage systems.
