From e62f74bb806d2c3756b3068ce2046268694b143a Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 30 Jun 2023 12:31:01 +0530 Subject: [PATCH] feat: update key format --- lib/integrations/openai_processor_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/integrations/openai_processor_service.rb b/lib/integrations/openai_processor_service.rb index 0330821c3..cedc2bbf9 100644 --- a/lib/integrations/openai_processor_service.rb +++ b/lib/integrations/openai_processor_service.rb @@ -30,11 +30,11 @@ class Integrations::OpenaiProcessorService return nil unless conversation format(::Redis::Alfred::OPENAI_CONVERSATION_KEY, event_name: event['name'], conversation_id: conversation.id, - updated_at: conversation.updated_at.to_i) + updated_at: conversation.last_activity_at.to_i) end def value_from_cache - # since the value from cache depends on the conversation last_updated_at, it will always be fresh + # since the value from cache depends on the conversation last_activity_at, it will always be fresh return nil if cache_key.blank? Redis::Alfred.get(cache_key)