added parameters to cache method