openfoodfacts / openfoodfacts-php

PHP wrapper for Open Food Facts
https://packagist.org/packages/openfoodfacts/openfoodfacts-php
MIT License
59 stars 34 forks source link

Cache: Use dependency injection for custom solutions #12

Closed Dwarfex closed 5 years ago

Dwarfex commented 5 years ago

Hi, as it is mentioned in the code: "//TODO : add cache interface ?" https://github.com/openfoodfacts/openfoodfacts-php/blob/deeef6cb617b53e63fe115976afdf0db039bbfa5/src/Api.php#L116

I would suggest adding either an PSR-6 "Caching Interface" or PSR-16: "Common Interface for Caching Libraries". I personally would prefer PSR-16 and i'm already working on a PR to solve this issue.

Benoit382 commented 5 years ago

It was PSR-6.

rampmaster commented 5 years ago

done