sling-org-apache-sling-models-impl
sling-org-apache-sling-models-impl copied to clipboard
SLING-12279 - Use ResourceResolver#getPropertyMap() for resource/resolver adaptables
- Update Sling API dependency to 2.24.0 (to be able to use
ResourceResolver#getPropertyMap()
). - Create a common cache holder object for all types of caches.
- When the adaptable is a request, continue to keep only a single cache mapping adapter types to adaptation results.
- When the adaptable is a resource or resource resolver, store the cache holder in the appropriate resource resolver's property map (this map has the same lifecycle as the resource resolver).
- When the adaptable is anything else, use the "global cache".
- When the cache holder is not global, remove the use of synchronized maps (moderate performance improvement since resources/resolvers should only be used single threaded).
- Ensure the Request cache holder's
close()
is called when the request is disposed. - Update tests where needed.
- Add tests for new code.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
87.5% Coverage on New Code
0.0% Duplication on New Code