JSON format does not serialize object instances, which we don't
want anyways, and improves readability. The hashing algorithm
changed to md5 to prevent collisions with existing cache files
There is no need to check the absense of the parameters in
all functions. Instead 'getCacheName' is the only function
actually using the parameters and thus should check the
availability.
Previously the cache file name was build on the original request URI
which also included the parameters. This could result in different
file name for the same request (different format). Removing the format
from the request is already done in index.php and could lead to issues
in the future (if new parameters are introduced).
The function 'prepare' previously implemented in CacheAbstract
is specifically required for FileCache and thus belongs to FileCache.
Since this change removes all code from CacheAbstract, it can be
removed completely.
Previously for each requested format a new cache file was created,
though the data is the same. With this the file name no longer depends
on the requested output format.