mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 06:16:40 +00:00
make the cached compile scripts a soft map
This commit is contained in:
parent
7bd08d638d
commit
807c485a38
@ -19,13 +19,13 @@
|
||||
|
||||
package org.elasticsearch.script;
|
||||
|
||||
import org.elasticsearch.common.collect.MapMaker;
|
||||
import org.elasticsearch.common.component.AbstractComponent;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.math.UnboxedMathUtils;
|
||||
import org.elasticsearch.common.mvel2.MVEL;
|
||||
import org.elasticsearch.common.mvel2.ParserContext;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
@ -37,7 +37,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
*/
|
||||
public class ScriptService extends AbstractComponent {
|
||||
|
||||
private final ConcurrentMap<String, Object> cache = ConcurrentCollections.newConcurrentMap();
|
||||
private final ConcurrentMap<String, Object> cache = new MapMaker().softValues().makeMap();
|
||||
|
||||
private final ParserContext parserContext;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user