utils: add wrapper for the loading cache#9638
Conversation
713b2a2 to
302d79d
Compare
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Follow up for apache#9638 Creates a utility class LazyCache which currently wraps Caffeine library Cache class. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
302d79d to
3842f13
Compare
Follow up for apache#9628 Creates a utility class LazyCache which currently wraps Caffeine library Cache class. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
3842f13 to
e6f1090
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9638 +/- ##
===========================================
Coverage 15.57% 15.58%
- Complexity 12056 12060 +4
===========================================
Files 5506 5507 +1
Lines 482919 482932 +13
Branches 61184 62859 +1675
===========================================
+ Hits 75233 75245 +12
Misses 399375 399375
- Partials 8311 8312 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10982 |
| import com.github.benmanes.caffeine.cache.Caffeine; | ||
| import com.github.benmanes.caffeine.cache.LoadingCache; | ||
|
|
||
| public class LazyCache<K, V> { |
There was a problem hiding this comment.
intentionally didn't use *Utils as we are/will be creating objects of this class unlike other static Utils classes. Any other suggestions maybe?
There was a problem hiding this comment.
How about org.apache.cloudstack.utils.Cache, @shwstppr ?
|
@blueorangutan test |
|
@rohityadavcloud a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@DaanHoogland @JoaoJandre do we need manual testing or is the smoketests good enough? Looks like just refactoring to me. @blueorangutan test |
|
@rohityadavcloud a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11458)
|
|
@shwstppr @rohityadavcloud why is this needed for 4.20? It seems like it could go in 4.20.1 |
|
@JoaoJandre It is just refactoring and good to have. I'm okay if you want to move it to 4.20.1. |
|
Closing this as it is part of #9840 |
Description
Follow up for #9628
Creates a utility class LazyCache which currently wraps Caffeine library Cache class.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?