Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add a Simple CacheInterface autowireable service #25708

Copy link
Copy link
Closed
@weaverryan

Description

@weaverryan
Issue body actions
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 4.1.0

Hi guys!

Awhile ago, I talked with Nicolas about adding a "simple-cache" service to the container (we would just wrap cache.app with our PSR16 adapter and make cache.app.simple. Then, we could add an alias so that Psr\SimpleCache\CacheInterface can be used for autowiring.

Nicolas suggestion we should not do this, because we should push people towards the more powerful interface. But, I'm working with a user now, and I just saw two problems:

  1. He tried to use CacheInterface, because it just guessed it - it's a good name. But, autowiring didn't work. AdapterInterface and CacheItemPoolInterface are much worse names for types.

  2. He found the PSR6 cache interface WAY confusing and complex: he simply wanted to store a few values with an expiration. But he was hit with this overkill.

So, I'd like to re-propose this: add the simple cache, and allow people to use it. If people need more complex features, then we show them the more powerful interface.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.