```ruby
class RedirectService

  def initialize(token)
    @token = token
  end

  def url
    link.url
  end

  private
  attr_reader :token

  def link
    if @link
      return @link
    end
    Link.where(token: token).first || NoLink.new
  end
end
```

Fix redirect service link memoization
user
```ruby
class RedirectService

  def initialize(token)
    @token = token
  end

  def url
    link.url
  end

  private
  attr_reader :token

  def link
    @link ||= Link.where(token: token).first || NoLink.new
  end
end
```
assistant