-
Notifications
You must be signed in to change notification settings - Fork 51
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
Enhancement: Move caching and other implementation details into Implementation / SPI #248
Comments
Thanks for moving this into a single issue. It is easier to track than three separate issues for essentially the same problem. The original issues discussed caching of the following:
Caching also exists in the current Jakarta EL API in the ImportHandler. A number of implementations (at least WildFly, JBoss EAP and Tomcat - there may well be others) have their own variant of the EL API at least in part so they can use an alternative cache implementation. There appears to be general consensus that making the cache implementations pluggable would be a good thing. There are differing opinions on how the caches should be implemented. The pluggable approach largely solves that by allowing different approaches to caching underneath the EL API. As we start designing this solution for EL 6.1, I think we first need to discuss and agree answers to the following:
|
My current thoughts:
Nice to have but I'd prioritise the 'right' solution for 6.1 onwards over a not quite as good solution that could be back-ported to 6.0.
The EL implementation which can then - if it wishes - delegate to the end user. I am concerned that delgating cache selection to the end user (the application in a Jakarta EE container) will create a whole new set of issues around how to select the implementation in a Jakarta EE container when multiple applications want - worse require - different implementations.
None I am aware of.
Yes. We shouldn't force EL implementations to re-implement caching if they are happy with the current defaults provided by the EL API.
Nothing comes to mind so far. |
|
Any more thoughts on these questions before I start thinking about an API for this? |
Im good with any API that allows clearing the cache by key's ClassLoader, thank you! |
I don't think the EL API is going to include explicit cache clearing. Individual implementations may well do. |
Currently, BeanELResolver (and others?) have implementation details, such as caching, built into the API.
There are a number of issues with this approach, including inability to update these implementation details
without breaking existing API signatures.
This also makes it impossible to properly invalidate the cache, which is dependent on integration with frameworks and application servers.
I propose to create an SPI and move the implementation details out of the API and into EL implementation.
I also propose adding invalidation methods to the default caching implementation, such as
clearProperties(ClassLoader)
that removes all beans that belong to a specific ClassLoader
Supersedes #218
Supersedes #214
Supersedes #215
The text was updated successfully, but these errors were encountered: