Skip to content

feat: Use Caffeine for caching compiled scripts in JSR223 samplers instead of commons-collections4 LRUMap#5909

Merged
vlsi merged 1 commit intoapache:masterfrom
vlsi:lrumap_jsr223
May 11, 2023
Merged

feat: Use Caffeine for caching compiled scripts in JSR223 samplers instead of commons-collections4 LRUMap#5909
vlsi merged 1 commit intoapache:masterfrom
vlsi:lrumap_jsr223

Conversation

@vlsi
Copy link
Collaborator

@vlsi vlsi commented May 11, 2023

Motivation and Context

Caffeine is a much more robust caching solution, so it makes sense to use it instead of the older LRUMap.

@vlsi vlsi added this to the 5.6 milestone May 11, 2023
@vlsi vlsi force-pushed the lrumap_jsr223 branch 3 times, most recently from 09ea6a6 to a93ddda Compare May 11, 2023 12:38
@vlsi vlsi force-pushed the lrumap_jsr223 branch from a93ddda to 5380e59 Compare May 11, 2023 12:39
@vlsi vlsi merged commit 5380e59 into apache:master May 11, 2023
@vlsi vlsi deleted the lrumap_jsr223 branch May 11, 2023 12:42
@owenpahl
Copy link

owenpahl commented Aug 7, 2023

@vlsi, I know this change is old and is already in master for a while now.
But I was looking through it as I was curious about the change to Caffeine, and I can't see anywhere in the source where compiled scripts are added to the new cache. There only appears to be two references to the cache, one to see if a script is present

CompiledScript compiledScript = COMPILED_SCRIPT_CACHE.get(newCacheKey, compiler);
and emptying the cache at the end of a test

@vlsi
Copy link
Collaborator Author

vlsi commented Aug 7, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants