Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/config.py @ 506:dffa692751b1
Implement clear_cache() for the configuration
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 18 Dec 2021 11:06:34 +0100 |
| parents | 4dbc16ff2670 |
| children | 402c7f5a2b76 |
comparison
equal
deleted
inserted
replaced
| 505:9e5fec21e2fb | 506:dffa692751b1 |
|---|---|
| 334 # | 334 # |
| 335 # PY2.7 compat: must be set before calling the superclass' __init__ | 335 # PY2.7 compat: must be set before calling the superclass' __init__ |
| 336 # | 336 # |
| 337 self.__cache = {} | 337 self.__cache = {} |
| 338 super(Configuration, self).__init__(*args, **kwds) | 338 super(Configuration, self).__init__(*args, **kwds) |
| 339 | |
| 340 def clear_cache(self): | |
| 341 self.__cache.clear() | |
| 339 | 342 |
| 340 def __getitem__(self, key): | 343 def __getitem__(self, key): |
| 341 """Mapping and list interface that forwards to :meth:`~.getvarl_s` | 344 """Mapping and list interface that forwards to :meth:`~.getvarl_s` |
| 342 | 345 |
| 343 """ | 346 """ |
