Updated memcache to avoid an extra array create when not necessary.