Hi!

The reasoning for this is two-folds and aims to keep the code readable (but perhaps I failed :) ):
 1. I wanted to avoid bloating the functions with the `global` kw. So I decided to put all globals inside a single global dict: `__cached`. 
 2. I also didn't want to check for the existence of keys in functions that access `__cache` (ie. putting either  `_cache.setdefault(k, v)` or `__cache.get(k, v)` in every function). In other words, a prerequisite of the module's functions is that all expected cached keys are available and with a sane default. This is `clean_cache`'s business : have the construction of a valid cache in one place.

Clearing `__cache` to `None` is essentially reverting point 2 and introducing tests in all functions - which is not a bad thing either. Hum, it's mainly a matter of keeping it manageable. Right now there are not many cached values or cache users so it really doesn't matter, but further on... dunno!

However, the implementation could be cleaner. Will check tomorrow.