This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README | Sun Sep 24 07:53:30 -0700 2006 | [yrashk] |
| |
Rakefile | Sun Apr 01 05:39:09 -0700 2007 | [yrashk] |
| |
init.rb | Sun Apr 08 06:37:16 -0700 2007 | [yrashk] |
| |
lib/ | Mon May 26 12:48:12 -0700 2008 | [yrashk] |
| |
spec/ | Thu Apr 19 02:18:10 -0700 2007 | [yrashk] |
README
Caches.rb ========= Caches.rb is a simplistic method cache for Ruby Simply do `BaseClass.extend Caches' and you will be able to specify caches :method_name or caches :method_name, :timeout => 2.minutes Default timeout is 60 seconds. What is important is that this solution caches calls with arguments. For example, if you will make a method_name(“Hello”) call you’ll get next method_name(“Hello”) cached, but method_name(“Bye”) will not be cached. Also you will be able to invalidate cache explicitly with invalidate_method_name_cache and invalidate_all_method_name_caches calls. Also you can invalidate caches with invalidate_all_caches or invalidate_all_caches :except => :name or invalidate_all_caches :except => [:name, :name1]




