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

PSR-7 / PSR-15 support #9

Closed
spotman opened this issue Jan 9, 2018 · 5 comments
Closed

PSR-7 / PSR-15 support #9

spotman opened this issue Jan 9, 2018 · 5 comments

Comments

@spotman
Copy link
Contributor

spotman commented Jan 9, 2018

Hi there!

I hope you're doing well! What about implementing support for PSR-7 HTTP messages and PSR-15 middleware? I have some ideas about refactoring the core to support this standards right from the box, in the same manner like PSR-16 cache that we implemented last year. This will allow to use page-cache with modern applications and frameworks, including async processing in ReactPHP. The PHP is moving formward and we need to do so :)

Have a nice day!

@spotman
Copy link
Contributor Author

spotman commented Jan 24, 2018

@mmamedov ping

@mmamedov
Copy link
Owner

mmamedov commented Jan 24, 2018 via email

@spotman
Copy link
Contributor Author

spotman commented Jan 25, 2018

@mmamedov OK, I have some spare time now and will try to debug this. Unfortunately, I had not this issue in my env so your PageCache initialization code is highly appreciated. I may emulate high load on this code and to check if everything is going well. Maybe we can create unit test for this case?

@mmamedov
Copy link
Owner

mmamedov commented Jan 25, 2018 via email

@spotman
Copy link
Contributor Author

spotman commented Jan 26, 2018

We may write one test script based on symfony/process and run multiple instances of the PageCache with the same configuration. This will emulate concurrency and/or cache stampede. I think that capturing PSR response would be much cleaner than raw echo and header so we may test your test case and PSR messages implementation in one test suite. Also we may run these tests on a multiple set of configuration options so more use cases will be covered.

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

2 participants