sling-org-apache-sling-models-impl icon indicating copy to clipboard operation
sling-org-apache-sling-models-impl copied to clipboard

SLING-12279 - Use ResourceResolver#getPropertyMap() for resource/resolver adaptables

Open paul-bjorkstrand opened this issue 3 months ago • 1 comments

  • 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.

paul-bjorkstrand avatar Mar 30 '24 21:03 paul-bjorkstrand