Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. Laminas Cache

Laminas Cache

BSD-3-ClausePHP4.3.0

A comprehensive PHP caching library supporting multiple storage adapters and caching patterns for callbacks, classes, and output.

Visit WebsiteGitHubGitHub
107 stars63 forks0 contributors

What is Laminas Cache?

Laminas\Cache is a general caching system for PHP that enables caching of various patterns like classes, objects, and output using a wide range of storage adapters such as databases, files, and Memcache. It provides a flexible and extensible solution for improving application performance through efficient data caching.

Target Audience

PHP developers building applications that require performance optimization through caching, especially those using or familiar with the Laminas ecosystem or PSR standards.

Value Proposition

Developers choose Laminas\Cache for its versatility across different PHP environments, support for multiple storage backends and caching patterns, and ability to be used standalone without a full MVC framework.

Overview

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

Use Cases

Best For

  • Caching PHP class instances or object data to reduce database or computation load.
  • Implementing output caching for web applications to improve response times.
  • Applications needing flexible storage options like files, databases, or Memcache for cached data.
  • Projects using Laminas or Mezzio frameworks that require integrated caching solutions.
  • Standalone PHP applications that need caching via a PSR-11 compatible container.
  • Performance benchmarking of caching strategies across different storage adapters.

Not Ideal For

  • Small-scale projects where simpler caching solutions like APCu or basic file caching would suffice without the overhead.
  • Teams already using Symfony framework who prefer its integrated Cache component for better framework cohesion.
  • Applications requiring strict adherence to PSR-6 or PSR-16 standards without additional abstraction layers.
  • Rapid prototyping scenarios where quick setup with minimal configuration is prioritized over flexibility.

Pros & Cons

Pros

Wide Storage Adapter Support

Supports diverse backends like DB, File, and Memcache, allowing developers to choose the best storage for their needs, as highlighted in the README's feature list.

Flexible Caching Patterns

Implements codified strategies for caching callbacks, classes, and output, enabling optimization across different application aspects without reinventing the wheel.

Standalone Integration

Can be used independently without laminas-mvc or mezzio by integrating with a PSR-11 container, offering adaptability for various PHP environments.

Built-in Benchmarking Tools

Includes PHPBench scripts for performance testing of storage adapters, helping developers make informed decisions based on real metrics.

Cons

Complex Standalone Setup

Requires additional packages like laminas-servicemanager and a PSR-11 container for non-framework use, adding initial configuration complexity beyond basic caching needs.

Steep Learning Curve

The multitude of adapters and patterns can be overwhelming for developers unfamiliar with the Laminas ecosystem or advanced caching concepts.

Framework-Centric Documentation

Documentation often assumes Laminas or Mezzio usage, with limited examples for standalone setups, making it harder for those outside the ecosystem.

Frequently Asked Questions

Quick Stats

Stars107
Forks63
Contributors0
Open Issues9
Last commit10 hours ago
CreatedSince 2019

Tags

#memcache#psr-6#caching#database-cache#psr-11#performance-optimization#file-cache#laminas#cache#php

Built With

P
PHP

Links & Resources

Website

Included in

PHP32.5k
Auto-fetched 10 hours ago

Related Projects

Doctrine CacheDoctrine Cache

Doctrine Cache component

Stars7,856
Forks210
Last commit11 months ago
CacheToolCacheTool

CLI App and library to manage apc & opcache.

Stars1,826
Forks158
Last commit7 months ago
StashStash

The place to keep your cache.

Stars963
Forks131
Last commit8 months ago
LockLock

Popular PHP library for serialized execution of critical code in concurrent situations

Stars948
Forks92
Last commit6 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub