added cache method for views