Skip to content

Allow Cache adapter to be a PSR-6 implementation #113

Closed
@Sander-Toonen

Description

@Sander-Toonen

With Symfony 3.1 a whole new range of PSR-6 compatible cache adapters have come to our disposal. Unfortunately the Cache provider in this bundle only accepts caches that implement Doctrine\Common\Cache\Cache and Doctrine Cache has not jumped on the PSR-6 wagon.

With this issue I'd like to open up a discussion how to facilitate the usage of PSR-6 compatible caches. I see a number of possibilities:

  • Rewrite Bazinga\Bundle\GeocoderBundle\Provider\Cache to support both doctrine and PSR-6 caches. (Maybe not really a SOLID solution).
  • Create a new cache provider for PSR-6 compatible caches alongside the DoctrineCache-only cache provider. (Might add a bit more complexity to the configuration.)
  • Use one of the many PSR-6 - DoctrineCache bridges. (Adds a dependency to another package.)
  • Do nothing and let the user implement a bridge. (Not user friendly)

Also I noticed geocoder-php/Geocoder#512.
HTTPPlug allows using a PSR-6 compatible cache plugin (http://docs.php-http.org/en/latest/plugins/cache.html) so another option altogether might be to delegate the caching to the Geocoder library itself.

I'd like to hear your ideas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions