add API for writing the cache file
add API for writing the cache file

Provide a stable API for writing to the cache file for projects that
don't want to invoke the shell command.

Change-Id: Iba80e313b6dba8182aebcba3f7bf99460226d75d
Signed-off-by: Doug Hellmann <0798ebecfb7bc4dfb9d0445c2fa030eb64e1fa1c@doughellmann.com>

openstack/reno