Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

fix: cache objects are now persistent #168

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

akouznetchik
Copy link
Contributor

  • Fixed caching. None of the caches were working. The CacheMap objects were declared, but never initialized. Therefore the cache object passed to setValueToCache() was null and the null check inside the function initialized the cache map that was local scoped, therefore the instance scoped cache objects remained null and were never filled.

@DuMaM DuMaM self-requested a review April 19, 2023 12:14
@DuMaM DuMaM added the regression-fix Bug fixes label Apr 19, 2023
@@ -886,7 +895,7 @@ private <T> void setValueToCache(String key, T value, CacheMap<String, T> cacheO

synchronized (this) {
if (cacheObj == null) {
cacheObj = new CacheMap<>(cacheSize);
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line dont have to be in sync right now but it's ok.
I will move this later on.

@DuMaM
Copy link
Contributor

DuMaM commented Apr 19, 2023

I will check this in Friday

@DuMaM DuMaM changed the title Fix caching fix: cache objects are now persistent Apr 19, 2023
@DuMaM DuMaM merged commit 4c4cba6 into jenkinsci:master Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants