( data)
| 48 | return cache_path |
| 49 | |
| 50 | def _hash( data): |
| 51 | # Serialize the data to a JSON string and encode to bytes |
| 52 | serialized_data = json.dumps(data).encode('utf-8') |
| 53 | |
| 54 | # Generate a hash from the serialized data |
| 55 | return md5(serialized_data).hexdigest() |
| 56 | |
| 57 | |
| 58 | def _has(cache_path): |