Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: CPAN for REBOL

From: andrew:wxc at: 4-Mar-2001 20:48

> What if there were an object! or function: > > cache/do http://www.mysite.com/~bobr/reboltools/hammer.r > > that would check against a local version and do that one first and only
check the net for something newer, say once a week?
> The function would have to be able to distinguish hammer.r as different
from ~jeff/somesubdir/hammer.r without requiring lots of subdirs on the local machine. Perhaps a hash of the path is used. Probably best to write the cache like this: Cache/Contents: [ "www" [ "mysite" [ "com" [ "~bobr" [ "reboltools" [ %hammer.r [ ; Script contained for http://www.mysite.com/~bobr/reboltools/hammer.r ] ] ] "~jeff" [ "somesubdir" [ %hammer.r [ ; Script for ~jeff/somesubdir/hammer.r ] ] ] ] ] ] "members" [ "nbci" [ "com" [ "AndrewMartin" [ "Rebol" [ "Scripts" [ %Index.r [ ; The contents of %Index.r. Note: don't look for this, yet... ] ] ] ] ] ] ] ] That way, if the remote file changes behaviour or requires additional files, it's really easy to adjust the cache to reflect the changes. The cache then saved to disk as a block in one file and easily loaded again, plus it's readable by humans in case of problems. Opinions? Comments? Suggestions? Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/