extract cache management into new class

Resolves easybib/issues#962