CacheLocal provides very simple cache function. There are two types of cache: file cache and process cache.
Add this line to your application's Gemfile:
gem 'cache_local'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cache_local
require 'cache_local'
file_cache = CacheLocal::File.new(path_to_cache_directory, namespace)
file_cache.set(key, value)
file_cache.get(key)
file_cache.delete(key)
file_cache.set(key, value, expiration_time) # enable to specify expiration time [sec]
require 'cache_local'
process_cache = CacheLocal::Process.new(namespace)
process_cache.set(key, value)
process_cache.get(key)
process_cache.delete(key)
process_cache.set(key, value, expiration_time) # enable to specify expiration time [sec]
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request