Skip to content

Commit 6eb668e

Browse files
Copilotnhorton
andcommitted
Clean up unused exception variables and unnecessary require
Co-authored-by: nhorton <[email protected]>
1 parent 0bb3579 commit 6eb668e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/active_support/cache/source_control_cache_store.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
require "active_support/cache"
55
require "active_support/notifications"
66
require "active_support/core_ext/object/json"
7-
require "active_support/core_ext/digest"
87
require "digest"
98
require "fileutils"
109

@@ -63,7 +62,7 @@ def read_entry(key, **options)
6362

6463
# Create a new entry that never expires
6564
ActiveSupport::Cache::Entry.new(entry.value, expires_in: nil)
66-
rescue => e
65+
rescue
6766
# If we can't read or deserialize, treat as cache miss
6867
nil
6968
end
@@ -84,7 +83,7 @@ def write_entry(key, entry, **options)
8483
File.write(value_path(hash), serialize_entry(entry, **options))
8584

8685
true
87-
rescue => e
86+
rescue
8887
# Return false if write fails (permissions, disk space, etc.)
8988
false
9089
end
@@ -103,13 +102,13 @@ def delete_entry(key, **options)
103102

104103
begin
105104
deleted = true if File.exist?(key_file) && File.delete(key_file)
106-
rescue => e
105+
rescue
107106
# Ignore errors, continue trying to delete value file
108107
end
109108

110109
begin
111110
deleted = true if File.exist?(value_file) && File.delete(value_file)
112-
rescue => e
111+
rescue
113112
# Ignore errors
114113
end
115114

0 commit comments

Comments
 (0)