Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
hotfix: invalidate cache in handler
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Sep 2, 2024
1 parent e0df426 commit 1c6fc30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/controllers/registration_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def create

RegistrationProcessor.set(message_group_id: message_group_id, message_deduplication_id: message_deduplication_id).perform_later(step_data)

# Invalidate Cache
Rails.cache.delete("#{message[:user_id]}-registrations-by-user")

render json: { status: 'accepted', message: 'Started Registration Process' }, status: :accepted
end

Expand Down
3 changes: 0 additions & 3 deletions app/jobs/registration_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ def perform(message)
message[:step_details][:guests],
message[:created_at])
end

# Invalidate Cache
Rails.cache.delete("#{message[:user_id]}-registrations-by-user")
end

private
Expand Down

0 comments on commit 1c6fc30

Please sign in to comment.