reapply the revert made in r83875
Now the _collections is statically built, the build dependencies are in proper
order and build works fine.
Commit Log from r83874:
Issue 9396. Apply functools.lru_cache in the place of the
random flushing cache in the re module.
diff --git a/Misc/NEWS b/Misc/NEWS
index 00188d4..57bcf8e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -697,8 +697,8 @@
- The default size of the re module's compiled regular expression cache has been
increased from 100 to 500 and the cache replacement policy has changed from
- simply clearing the entire cache on overflow to randomly forgetting 20% of the
- existing cached compiled regular expressions. This is a performance win for
+ simply clearing the entire cache on overflow to forgetting the least recently
+ used cached compiled regular expressions. This is a performance win for
applications that use a lot of regular expressions and limits the impact of
the performance hit anytime the cache is exceeded.