Add optional basename param to getCachePath.
Add HttpHeaders class, and overhaul config in __construct.