added array parameter to cache method