[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: Arch Cache & cached archives

From: Aaron Bentley
Subject: Re: [Gnu-arch-users] Re: Arch Cache & cached archives
Date: Wed, 15 Sep 2004 19:13:23 -0400
User-agent: Mozilla Thunderbird 0.5 (X11/20040306)

Stefan Monnier wrote:
I think that caching vs. memoizing should (at least ultimately) be a
finely tunable parameter.

Could someone explain to me what is the difference between caching and
memoizing here?

Roughly speaking, when you have a function or process that is costly to perform, and will likely be repeated, you can speed things up by storing the answer, and using that answer instead of repeating the process. This only works if the answer will always be the same for the same inputs, and usually requires a set of answers to be stored, indexed by the inputs that produced them.

With caching, in contrast, you are storing answers that may change. Caches usually have built-in expiration mechanisms, and ways to check whether the cached data is out of date.

To bring it back to tla, the tree state of a revision that exists is fixed and permanent. Use any mirror of address@hidden, do "tla get address@hidden/tla--devo--1.3--patch-5", and you'll get equivalent results.

Cacherevs aren't permanent-- they can be added or removed at any time. So you may get different results running "tla cachedrevs" today versus running it tomorrow, even if you're using the same mirror.

So we can store a tarred, gzipped tree of a revision permanently. But the information about which cacherevs a mirror contains is subject to change without notice.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]