title: fix corrupted shelve cache
body: <p>A shelve that I've created isn't allowing me to access the keys without the following failure.</p>
  
  <p><code>x = shelve.open('my_shelve.pkl')
  x.keys()</code></p>
  
  <p><code>bsddb.db.DBPageNotFoundError: (-30986, 'BDB0075 DB_PAGE_NOTFOUND: Requested page not found')</code></p>
  
  <p>However, I am able to check if the Shelf contains a key like so:</p>
  
  <p><code>'some-key' in x</code>, </p>
  
  <p>and additionally, the Shelf will return the correct data with</p>
  
  <p><code>x['some-key']</code></p>
  
  <p>I don't have the list of keys elsewhere, so I'd like to somehow retrieve the keys so I can retrieve the data, or otherwise fix the issue with the database.</p>
  
  <p>I'm using Python 2.7.6</p>