From 0539f123a01f2a1912c873cdf115c5e117a2745c Mon Sep 17 00:00:00 2001 From: To-om Date: Tue, 3 Nov 2020 14:01:36 +0100 Subject: [PATCH] #1490 Limit flow size --- thehive/app/org/thp/thehive/services/FlowActor.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/services/FlowActor.scala b/thehive/app/org/thp/thehive/services/FlowActor.scala index 593a5956b3..44b6da1d26 100644 --- a/thehive/app/org/thp/thehive/services/FlowActor.scala +++ b/thehive/app/org/thp/thehive/services/FlowActor.scala @@ -62,7 +62,7 @@ class FlowActor extends Actor { organisations.foreach { organisation => val cacheKey = FlowId(organisation, None).toString val ids = cache.get[List[String]](cacheKey).getOrElse(Nil) - cache.set(cacheKey, id :: ids) + cache.set(cacheKey, (id :: ids).take(10)) cases.foreach { caseId => val cacheKey: String = FlowId(organisation, Some(caseId)).toString val ids = cache.get[List[String]](cacheKey).getOrElse(Nil)