Adds caching for snippets