Fixed close bug in BDBCache