param name consistency
add support for setting encoding on CachedFile

also fix up the tests