Fixes #5523: Generate cache in a configurable directory

Since the way ncf works is to have a central installation directory and one or many "instance" directories, with the same directory names within, I think the file name should contain the parent directory name (framework_path here). It should probably be canonified to avoid path issues and respect POLA for cfengine users.