#6 Added template for caching