major reformatting of the cache subsystem (again) added substantial documentation too in header files