renamed 'cache' to 'buffer' as this is its purpose