PHP Cache

PHP缓存组织致力于为PHP项目提供坚实、强大、灵活和轻量级的缓存库。(The PHP Cache organization is dedicated to providing solid, powerful, flexible, and lightweight caching libraries for PHP projects. )

Github stars Tracking Chart

The PHP Cache organization(PHP缓存组织)致力于为PHP项目提供坚实、强大、灵活和轻量级的缓存库。 我们创建的所有适配器都符合 PSR-6PSR-16。 如果您是库实施者,我们甚至还有一个测试库可以帮助您实现PSR规范。\r\n

您可以在下面找到有关我们的库提供的功能以及我们拥有的适配器的信息。 您还可以找到框架集成库。

如果您是PSR-6缓存的新手,可能需要看看我们的介绍

缓存池实现

这个组织有很多适配器。 他们每个都住在不同的仓库。 在多个软件包中拆分它们符合通用重用原则,使开发人员更轻松地跟踪特定适配器的更改。

每个适配器都有自己的功能。 下表列出了我们所有的适配器及其功能。

\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
AdapterTaggingHierarchy*Badges
ApcYesNoLatest Stable Version Total Downloads
ApcuYesNoLatest Stable Version Total Downloads
ArrayYesNoLatest Stable Version Total Downloads
Couchbase 1.x (via Doctrine)YesNo
Filesystem (via Flysystem)YesNoLatest Stable Version Total Downloads
IlluminateYesNoLatest Stable Version Total Downloads
MemcacheYesNoLatest Stable Version Total Downloads
MemcachedYesYesLatest Stable Version Total Downloads
MongoDBYesNoLatest Stable Version Total Downloads
PredisYesYesLatest Stable Version Total Downloads
RedisYesYesLatest Stable Version Total Downloads
Riak (via Doctrine)YesNo
SQLite3 (via Doctrine)YesNo
VoidYesYesLatest Stable Version Total Downloads
WinCache (via Doctrine)YesNo
Xcache (via Doctrine)YesNo
ZendData (via Doctrine)YesNo
ChainYesLatest Stable Version Total Downloads
DoctrineYesNoLatest Stable Version Total Downloads

*层次结构存储大量从未被主动删除的缓存中的额外项目。像Redis和Memcache这样的高速缓存存储器的一些实现将在它们不再使用或不再使用时自动删除这些项目。这就是为什么层次结构在这样的缓存存储上会更好的工作。\r\n

链式适配器

我们还有一个链接适配器,您可以将多个池连接在一起。如果您拥有内存有限的快速存储器和内存量较大的存储器,那将是非常好的。

Doctrine 适配器

doctrine适配器是一个封装 Doctrine\Common\Cache\Cache 对象的 PSR-6 适配器。使用此适配器,您可以使用当前没有任何PHP缓存适配器的存储库,如 Riak 和 WinCache。

安装

使用编辑器安装上述任何适配器。某些适配器可能需要配置才能使用。请参阅适配器的 Github 页面,了解如何配置它们。您也可以使用 Symfony AdapterBundle 配置适配器。

composer require cache/[any]-adapter\r\n

您还可以使用缓存/缓存来安装所有适配器

composer require cache/cache\r\n
要求

除非另有指定,否则所有适配器都支持PHP版本^ 5.5和^ 7.0。大多数适配器还有对PHP扩展的要求。像Redis适配器一样需要ext-redis。\r\n

Overview

Name With Ownerphp-cache/cache
Primary LanguagePHP
Program languageShell (Language Count: 2)
Platform
License:MIT License
Release Count5
Last Release Name1.0.0 (Posted on )
First Release Name0.1.0 (Posted on )
Created At2016-01-31 18:42:57
Pushed At2024-01-26 14:04:39
Last Commit At2022-08-15 08:05:19
Stargazers Count265
Watchers Count14
Fork Count81
Commits Count451
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count219
Pull Requests Open Count20
Pull Requests Close Count39
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

PHP Cache

Gitter
codecov.io
Build Status
Software License
StyleCI

This is the main repository for all our cache adapters and libraries. To read about
features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.

Back in 2016, this was the first library supporting PSR-6. We created Symfony bundles
and made many great libraries in the PHP-cache organization. This was a few years ago
and the library is not activly maintained. Starting a new project one should consider
using the more performant and activly supported
Symfony Cache.

Notice

This library is for development use. All pull requests to the adapters, and libraries included in here, should be made to this library.

If you are lazy, you can also include this project, to include all the adapters and libraries.

Contribute

Contributions are very welcome! Make sure you check out the contributing docs and send us a pull request or report any issues you find on the issue tracker. Feel free to come chat with us on Gitter too.

To the top