load/store_to_cache files dependent on type

Another argument was added to the load/store_to_cache
methods, which specifies, if the hash of the class name
of the stored object should be part of the file name.