cache __len__ result