I personally believe that this doesn't make sense, since the in root node you clearly say: "My idea is using temporary files for each command output, and use the time stamp of each file to know if that output is out of date or not." So basically it seems you want a form of caching/memoizing that is persistent across program invocations, and manages expiration dates. Cache::FileCache appears to do exactly this; in particular if you did care to read the very description "section" (it's one line!) of its documentation, then you would have found that:
The FileCache class implements the Cache interface. This cache stores data in the filesystem so that it can be shared between processes.
The additional emphasis is mine: please note that it talks about data which is agnostic wrt whered does it come from, be it a "command" or whatever...