I'm not sure what you're asking, but it sounds as if you want either Cache::FileCache or Memoize.
In reply to Re: Cache commands output by kyle in thread Cache commands output by wangcong