No commit activity in last 3 years
No release in over 3 years
Executes on the command line, caching results for performance of repeated invocations.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 1.0
~> 0.1.1
~> 10.0
~> 3.1
 Project Readme

Command::Cacheable

Command::Cacheable wraps the command line, optionally caching standard output for later, faster retrieval.

Installation

Add this line to your application's Gemfile:

gem 'command-cacheable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install command-cacheable

Usage

From the Svnx project:

    require 'command/cacheable/command'
    ls = Command::Cacheable::Command.new [ "ls", "/tmp" ]
    ls.execute
    
    lsc = Command::Cacheable::Command.new [ "ls", "/tmp" ], caching: true, cachedir: "/tmp/lscache"
    lsc.execute

    diff = lsc.output - ls.output

Command::Cacheable is specifically for caching commands, and does not have the flexibility that the Command gem does. For one, it does not cache standard error.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jpace/command-cacheable.

License

The gem is available as open source under the terms of the MIT License.