Skip to content

Commit

Permalink
fix: Restore cache calls in LocationService, fixing some warnings (#2190
Browse files Browse the repository at this point in the history
)
  • Loading branch information
joshlarson authored Oct 22, 2024
1 parent 3c6456c commit 6f4a84f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/location_service/location_service.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ defmodule LocationService do
@behaviour LocationService.Behaviour

@impl LocationService.Behaviour
# @decorate cacheable(cache: @cache, on_error: :nothing, opts: [ttl: @ttl])
@decorate cacheable(cache: @cache, on_error: :nothing, opts: [ttl: @ttl])
def autocomplete(text, limit, options \\ @bias_options) do
options
|> Map.merge(%{"Text" => text, "MaxResults" => limit})
|> then(&@aws_client.search_place_index_for_suggestions(index(), &1))
|> handle_response()
end

# @decorate cacheable(cache: @cache, on_error: :nothing, opts: [ttl: @ttl])
@decorate cacheable(cache: @cache, on_error: :nothing, opts: [ttl: @ttl])
@impl LocationService.Behaviour
def geocode(address, options \\ @bounding_options) do
options
Expand All @@ -42,7 +42,7 @@ defmodule LocationService do
|> handle_response()
end

# @decorate cacheable(cache: @cache, on_error: :nothing, opts: [ttl: @ttl])
@decorate cacheable(cache: @cache, on_error: :nothing, opts: [ttl: @ttl])
@impl LocationService.Behaviour
def reverse_geocode(latitude, longitude, options \\ @bounding_options) do
options
Expand Down

0 comments on commit 6f4a84f

Please sign in to comment.