(key, value)
| 58 | return None |
| 59 | |
| 60 | def add_cache(key, value): |
| 61 | global_cache_index[key] += 1 |
| 62 | global_cache[key].append(value) |
| 63 | |
| 64 | if cache_format == "pickle": |
| 65 | with open(cache_path, 'wb') as f: |
| 66 | pickle.dump(global_cache, f) |
| 67 | elif cache_format == "json": |
| 68 | with open(cache_path, 'w') as f: |
| 69 | json.dump(global_cache, f, indent=4) |
| 70 | |
| 71 | return value |
| 72 | |
| 73 | def pkl_to_json(filename): |
| 74 | assert 'pkl' in filename, filename |
no outgoing calls
no test coverage detected