reuse generator object
Pass cache_dir option to ActionGenerator
Fix class template