Class ScriptCache
- java.lang.Object
- 
- org.keycloak.authorization.policy.provider.js.ScriptCache
 
- 
 public class ScriptCache extends Object - Author:
- Pedro Igor
 
- 
- 
Constructor SummaryConstructors Constructor Description ScriptCache(int maxEntries)Creates a new instance.ScriptCache(int maxEntries, long maxAge)Creates a new instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluatableScriptAdaptercomputeIfAbsent(String id, Function<String,EvaluatableScriptAdapter> function)voidremove(String key)
 
- 
- 
- 
Constructor Detail- 
ScriptCachepublic ScriptCache(int maxEntries) Creates a new instance.- Parameters:
- maxEntries- the maximum number of entries to keep in the cache
 
 - 
ScriptCachepublic ScriptCache(int maxEntries, long maxAge)Creates a new instance.- Parameters:
- maxEntries- the maximum number of entries to keep in the cache
- maxAge- the time in milliseconds that an entry can stay in the cache. If- -1, entries never expire
 
 
- 
 - 
Method Detail- 
computeIfAbsentpublic EvaluatableScriptAdapter computeIfAbsent(String id, Function<String,EvaluatableScriptAdapter> function) 
 - 
removepublic void remove(String key) 
 
- 
 
-