cache: rewrite package (closes #95)