Skip to content

Commit 11f2d42

Browse files
committed
Update cache keys to be shorter
1 parent b5a9525 commit 11f2d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rails/diff.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def ensure_template_app_exists(commit, new_app_options)
6565
end
6666

6767
def template_app_path
68-
@template_app_path ||= File.join(CACHE_DIR, commit, rails_new_options_hash, app_name)
68+
@template_app_path ||= File.join(CACHE_DIR, "rails-#{commit.first(10)}", rails_new_options_hash, app_name)
6969
end
7070

7171
def rails_path
@@ -220,7 +220,7 @@ def rails_new_command = @rails_new_command ||= [
220220

221221
def rails_new_options = @rails_new_options ||= [*new_app_options, *railsrc_options].compact
222222

223-
def rails_new_options_hash = Digest::SHA256.hexdigest(rails_new_options.join(" "))
223+
def rails_new_options_hash = Digest::MD5.hexdigest(rails_new_options.join(" "))
224224
end
225225

226226
class CLI < Thor

0 commit comments

Comments
 (0)