Commit a43df5d
committed
Cache validity of a locale name
Currently `_cache` is only populated on `load`, this is an issue with
code which do a lot of locale parsing / instantiation but for one
reason or an other rarely end up needing to actually load the locale
data (e.g. date formatting with non-locale-dependent patterns) because
every cache miss is an `os.path.exists`.
Cache `exists` separately.
Update test because `lru_cache` requires all parameters to be
hashasble and a list is not that.1 parent 56c63ca commit a43df5d
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments