Refactored cache generation.
Added thrift tools.
Removed unnecessary arg.