Flatten the lru cache keyword args tuple for better memory utilization.
diff --git a/Lib/functools.py b/Lib/functools.py
index ae4175d..1e7795f 100644
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -185,7 +185,9 @@
             key = args
             if kwds:
                 sorted_items = tuple(sorted(kwds.items()))
-                key += kwd_mark + sorted_items
+                key += kwd_mark
+                key += tuple(k for k, v in sorted_items)
+                key += tuple(v for k, v in sorted_items)
             if typed:
                 key += tuple(type(v) for v in args)
                 if kwds: