Added array caching for cli