Here's what I meant with the original comment:
```ruby
if pre_stored && !digest # something went wrong
  @@cache.delete_pair(cache_key, false) # make sure not to corrupt the @@cache
end
```
after the change it no longer "works" as intended:
```ruby
if pre_stored # something went wrong
  @@cache.delete_pair(cache_key, false) # make sure not to corrupt the @@cache
end
```

I think the code might be just a bit too clever anyway, how about:
```ruby
rescue Exception
  @@cache.delete_pair(cache_key, false) if pre_stored # make sure not to corrupt the @@cache
  raise
```