Skip to content

Commit 7da4f7f

Browse files
committed
Implement #inspect for file & null cache store
1 parent ccb6462 commit 7da4f7f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

activesupport/lib/active_support/cache/file_store.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def delete_matched(matcher, options = nil)
8585
end
8686
end
8787

88+
def inspect # :nodoc:
89+
"#<#{self.class.name} cache_path=#{@cache_path}, options=#{@options.inspect}>"
90+
end
91+
8892
private
8993
def read_entry(key, **options)
9094
if payload = read_serialized_entry(key, **options)

activesupport/lib/active_support/cache/null_store.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ def decrement(name, amount = 1, options = nil)
3232
def delete_matched(matcher, options = nil)
3333
end
3434

35+
def inspect # :nodoc:
36+
"#<#{self.class.name} options=#{@options.inspect}>"
37+
end
38+
3539
private
3640
def read_entry(key, **s)
3741
deserialize_entry(read_serialized_entry(key))

0 commit comments

Comments
 (0)