Move the cache to a singleton class

Signed-off-by: emanuele <emanuele45@gmail.com>
Documentation and few fixes

Signed-off-by: emanuele <emanuele45@gmail.com>
Do not use Load.php to invalidate the cache, but CACHEDIR/index.php, it must be there and it should very well be writable

Signed-off-by: emanuele <emanuele45@gmail.com>