hello @avpaderno,
Ok I get your point and as I see we have 2 solutions:
- Implement HttpKernelInterface instead of extending PageCache but this will lead to redefining the entire pageCache class in our new class
- Use a service instead of a StackMiddleware but this beats the purpose of the module because we are trying to do it without bootstraping drupal
Can you give us your opinion on these 2 solutions?
Do you see other possibilities?
hello @avpaderno,
Thank you for taking the time to review the module.
I corrected the points mentioned in your comment except:
core/modules/page_cache/src/StackMiddleware/PageCache.php
Stack middleware implementations done by Drupal core and its modules are internal API. Classes like Drupal\page_cache\StackMiddleware\PageCache cannot be used as parent class.
I am not sure I understand what's the problem nor the alternative.
Correct me if I am wrong but for me the purpose of the contrib modules is to extend core functionnalities, also I did find many modules extending PageCache ( ex:
Advanced Internal Page Cache →
)
joseph28 → created an issue.
Thank you very much.
joseph28 → created an issue.