Spec for caching when called with array