add cache to resource