Skip to content

Commit

Permalink
fix: add cache to address live cells api
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Mar 13, 2024
1 parent 675a342 commit eb1a142
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/api/v1/address_live_cells_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ class AddressLiveCellsController < ApplicationController
before_action :validate_pagination_params, :pagination_params

def show
expires_in 1.minutes, public: true, must_revalidate: true, stale_while_revalidate: 10.seconds

address = Address.find_address!(params[:id])
raise Api::V1::Exceptions::AddressNotFoundError if address.is_a?(NullAddress)

Expand Down

0 comments on commit eb1a142

Please sign in to comment.