shin1ohno/janiConverter

View on GitHub
app/models/concerns/movie_uuid_cacheable.rb

Summary

Maintainability
A
0 mins
Test Coverage
module MovieUUIDCacheable
  extend ActiveSupport::Concern

  def cached_movie_uuid
    Rails.cache.fetch("movie:uuid:#{movie_id}") do
      movie.uuid
    end
  end
end