Class: SolidStackWeb::CacheStats

Inherits:
Object
  • Object
show all
Defined in:
app/models/solid_stack_web/cache_stats.rb

Instance Method Summary collapse

Instance Method Details

#to_hObject



3
4
5
6
7
8
9
# File 'app/models/solid_stack_web/cache_stats.rb', line 3

def to_h
  {
    entries:      ::SolidCache::Entry.count,
    byte_size:    ::SolidCache::Entry.sum(:byte_size),
    oldest_entry: ::SolidCache::Entry.minimum(:created_at)
  }
end