Module: Cachext::Features::Backup

Included in:
Client
Defined in:
lib/cachext/features/backup.rb

Instance Method Summary collapse

Instance Method Details

#handle_error(key, options, error) ⇒ Object



9
10
11
12
# File 'lib/cachext/features/backup.rb', line 9

def handle_error key, options, error
  super
  key.read_backup
end

#handle_not_found(key, options, error) ⇒ Object



4
5
6
7
# File 'lib/cachext/features/backup.rb', line 4

def handle_not_found key, options, error
  key.delete_backup
  super
end

#write(key, fresh, options) ⇒ Object



14
15
16
17
# File 'lib/cachext/features/backup.rb', line 14

def write key, fresh, options
  super
  key.write_backup fresh
end