SLING-12279 - Use ResourceResolver#getPropertyMap() for resource/resolver adaptables#50
Open
paul-bjorkstrand wants to merge 1 commit intoapache:masterfrom
Conversation
joerghoh
approved these changes
Apr 26, 2024
| Map<Object, Object> nonSyncMap= AdapterCacheHolder.newMap(false); | ||
| Map<Object, Object> syncMap= AdapterCacheHolder.newMap(true); | ||
|
|
||
| System.out.println(nonSyncMap.getClass()); |
Contributor
Author
There was a problem hiding this comment.
Indeed they are not. Updated in latest push.
|
1a6cb02 to
2cc2610
Compare
Contributor
Author
|
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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