Limit cache data size to avoid database errors
Don't list empty (nil) metadata entries to save memory anc caching space