翻译进度
3
分块数量
0
参与人数

PSR-16 缓存接口 - 说明文档

这是一篇协同翻译的文章,你可以点击『我来翻译』按钮来参与翻译。

PSR-16 Meta Document

1. Summary

Caching is a common way to improve the performance of any project, and many libraries make use or could make use of it. Interoperability at this level means libraries can drop their own caching implementations and easily rely on the one given to them by the framework, or another dedicated cache library the user picked.

2. Why Bother?

PSR-6 solves this problem already, but in a rather formal and verbose way for what the most simple use cases need. This simpler approach aims to build a standardized layer of simplicity on top of the existing PSR-6 interfaces.

3. Scope

3.1 Goals

  • A simple interface for cache operations.
  • Basic support for operations on multiple keys for performance (round-trip-time) reasons.
  • Providing an adapter class that turns a PSR-6 implementation into a PSR-Simple-Cache one.
  • It should be possible to expose both caching PSRs from a caching library.

3.2 Non-Goals

  • Solving all possible edge cases, PSR-6 does this well already.

4. Approaches

The approach chosen here is very barebones by design, as it is to be used only by the most simple cases. It does not have to be implementable by all possible cache backends, nor be usable for all usages. It is merely a layer of convenience on top of PSR-6.

5. People

5.1 Editor(s)

  • Paul Dragoonis (@dragoonis)

5.2 Sponsors

  • Jordi Boggiano (@seldaek) - Composer (Coordinator)
  • Fabien Potencier (@fabpot) - Symfony

5.3 Contributors

For their role in the writing the initial version of this cache PSR:

  • Evert Pot (@evert)
  • Florin Pățan (@dlsniper)

For being an early reviewer

  • Daniel Messenger (@dannym87)

6. Votes

7. Relevant Links

本文章首发在 Laravel China 社区
本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。

讨论数量: 0
发起讨论


暂无话题~