From 4641e1a1667a9da49926e65906e11f68dc707718 Mon Sep 17 00:00:00 2001 From: sahilchaudhary Date: Fri, 12 Jul 2024 11:06:28 +0530 Subject: [PATCH] Adding Redis cache on systemUpdate API For Question --- .../src/main/scala/org/sunbird/actors/QuestionActor.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assessment-api/assessment-actors/src/main/scala/org/sunbird/actors/QuestionActor.scala b/assessment-api/assessment-actors/src/main/scala/org/sunbird/actors/QuestionActor.scala index 3f0ed87fc..ffefa8ad6 100644 --- a/assessment-api/assessment-actors/src/main/scala/org/sunbird/actors/QuestionActor.scala +++ b/assessment-api/assessment-actors/src/main/scala/org/sunbird/actors/QuestionActor.scala @@ -3,6 +3,7 @@ package org.sunbird.actors import org.apache.commons.lang3.StringUtils import org.sunbird.`object`.importer.{ImportConfig, ImportManager} import org.sunbird.actor.core.BaseActor +import org.sunbird.cache.impl.RedisCache import org.sunbird.common.dto.{Request, Response, ResponseHandler} import org.sunbird.common.{DateUtils, Platform} import org.sunbird.graph.OntologyEngineContext @@ -92,6 +93,7 @@ class QuestionActor @Inject()(implicit oec: OntologyEngineContext) extends BaseA def systemUpdate(request: Request): Future[Response] = { val identifier = request.getContext.get("identifier").asInstanceOf[String] RequestUtil.validateRequest(request) + RedisCache.delete(identifier) val readReq = new Request(request) val identifiers = new util.ArrayList[String](){{ add(identifier)