Simple Python cache and memoizing module