MAINT: use a structure as cache buckets