[BioRuby] RFC Caching (was BioRuby standards)
    Pjotr Prins 
    pjotr2008 at thebird.nl
       
    Tue Sep  9 11:38:16 UTC 2008
    
    
  
I wrote a simple file Cache Singleton. See:
  http://github.com/pjotrp/bioruby/tree/462614487767568f41db03d894875a3d78ced08e/lib/bio/db/microarray/cache.rb
The Cache can be read and set with:
  dir = Bio::Microarray::Cache.instance.directory('GEO')
	# override cache dir
  dir = Bio::Microarray::Cache.instance.set(newcachedir,'GEO')
	
Everyone OK with this?
Pj.
On Tue, Sep 02, 2008 at 11:19:58AM +0200, Pjotr Prins wrote:
> > Note that some classes use Tempfile class, a standard bundled
> > class with Ruby by default, and the Tempfile class depends
> > on enviroment variables (TMPDIR, TMP, etc.).
> 
> I noticed. Caching is a bit different in nature - as caches may be
> there for a long time. TMPDIRs get emptied on reboot, for one.
> 
> > I think cache isn't suitable for standard, because its purpose
> > may differ from program (or class, module, etc.) to program.
> 
> > For example, if I want to put class A's cache on a fast hard disk
> > with very large size, and program B's cache on a slower hard disk
> > with small size, what should I do?
> 
> That is true. OK, leave caching for the modules to resolve. I'll use
> my own caching of GEO XML objects.
    
    
More information about the BioRuby
mailing list