Cast cache to list: cache changes during iteration
Cast cache to list: cache changes during iteration

Cache items are changed while looping over the cache items, this causes an
`Dictionary keys changed during iteration` error in python>=3.8.

Cast the cache to a list first and iterate over the list to prevent the error.

avalentino/PyTables,PyTables/PyTables,avalentino/PyTables,FrancescAlted/PyTables,avalentino/PyTables,FrancescAlted/PyTables,FrancescAlted/PyTables,PyTables/PyTables,PyTables/PyTables