cache get_csv
authorJacob Lifshay <programmerjake@gmail.com>
Wed, 14 Jun 2023 05:53:52 +0000 (22:53 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Wed, 14 Jun 2023 05:53:52 +0000 (22:53 -0700)
src/openpower/decoder/power_enums.py

index 6e32fb996d38d30a18446fdbff65c6876b246998..fb90b135d23c1bec0cbbdfaf42f238de4718aed4 100644 (file)
@@ -40,6 +40,12 @@ def find_wiki_file(name):
 
 
 def get_csv(name):
+    retval = _get_csv(name)
+    return [i.copy() for i in retval]
+
+
+@functools.lru_cache()
+def _get_csv(name):
     """gets a not-entirely-csv-file-formatted database, which allows comments
     """
     file_path = find_wiki_file(name)