#!/usr/bin/env ruby require "../lib/libcache/cache_builder" require_relative "../lib/libcache/file_cache" cache = CacheBuilder.with(Cache).set_store(ARGV[0]).set_expiry('3s').set_refresh(Proc.new { |key| key + 12 }).build cache.put(1, 2) 2.times do |i| puts cache.get(1) sleep i end at_exit do cache.invalidateAll end