-
Notifications
You must be signed in to change notification settings - Fork 30
SLING-12279 - Use ResourceResolver#getPropertyMap() for resource/resolver adaptables #50
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
base: master
Are you sure you want to change the base?
Conversation
joerghoh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
| Map<Object, Object> nonSyncMap= AdapterCacheHolder.newMap(false); | ||
| Map<Object, Object> syncMap= AdapterCacheHolder.newMap(true); | ||
|
|
||
| System.out.println(nonSyncMap.getClass()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed they are not. Updated in latest push.
|
1a6cb02 to
2cc2610
Compare
|
I saw that a recent change caused a couple conflicts. Fixed with the latest push. |
…ver 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. Remove unnecessary println Spotless plugin cleanups Fix merge conflicts
f5ac1c5 to
1ae6ec3
Compare
|



ResourceResolver#getPropertyMap()).close()is called when the request is disposed.