Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider implementing PSR-06 #30

Open
chippyash opened this issue Apr 13, 2017 · 0 comments
Open

Consider implementing PSR-06 #30

chippyash opened this issue Apr 13, 2017 · 0 comments

Comments

@chippyash
Copy link

PSR-06 gives a caching interface for interoperability. Whilst doing this will be a BC break for your code and major version bump, it will give greater flexibility for your dependent libraries, Formidable in particular. Most dev shops will already have caching sorted and not want to use yet another one. By implementing PSR-06, you can flexibility in allowing users to utilise a different caching system that uses a different storage mechanism.

Now, there is some controversy as to whether PSR-06 is fit for purpose (see here and follow the links.) So you may not want to. There is evidence that it is gaining ground though, (see here.) Instead, you may want to consider supplying a new interface definition and use that as the type hint, with your caching mechanism implementing it. It would have to be a bit more generic than your current one, as that is very bound to using files. Consider replacing setCacheDirectory($cacheDirectory) with setCacheOptions(array $options) for instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant