Class: MDQT::CLI::CacheControl

Inherits:
Object
  • Object
show all
Defined in:
lib/mdqt/cli/cache_control.rb

Class Method Summary collapse

Class Method Details

.cache_type(options) ⇒ Object



13
14
15
16
17
18
# File 'lib/mdqt/cli/cache_control.rb', line 13

def cache_type(options)
  return :none if options.refresh
  return :memcache if options.cache && options.memcache
  return :file if options.cache
  :none
end

.caching_on?(options) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/mdqt/cli/cache_control.rb', line 8

def caching_on?(options)
  return false if cache_type(options) == :none
  true
end