Skip to content

Commit

Permalink
dont cache fresh world map
Browse files Browse the repository at this point in the history
  • Loading branch information
timcowlishaw committed Feb 28, 2024
1 parent 65787e7 commit f7443cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/v0/devices_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def destroy

# debug method, must be refactored
def fresh_world_map
@no_cache = true
render :world_map
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/v0/devices/world_map.jbuilder
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
json.cache! ["world_map"], expires_in: 1.minute do
json.cache_if! !@no_cache, ["world_map"], expires_in: 1.minute do
json.array! Device.for_world_map, partial: 'device', as: :device, local_assigns: { with_data: false, with_postprocessing: false, slim_owner: true, never_authorized: true }
end

0 comments on commit f7443cc

Please sign in to comment.