SqueakMap cache explained somewhat (Re: [squeak-dev] Cleaning up SqueakMap)

Chris Muller asqueaker at gmail.com
Fri May 14 19:32:06 UTC 2010


> ...since the purpose of the cache is to actually *help* when a URL goes
> bad/offline etc, it would otherwise be quite pointless and indeed a major
> bug.

Thanks for that explanation.  After all those years of using SM and
pulling my hair due to forgetting about the "cache bug", I finally
know what the motivation for it was..

I suppose my only suggestion would be, then, that we change SM to
always remove the cache entry and re-download the file and recompute
the hash when a release is updated, even if the URL did not change.
The purpose of the cache is trying to keep the *contents* of the
downloaded file correct and preserved for us, so those *contents*
should be updated in the cache when the release is updated by the
author, wouldn't you say?


2010/5/14 Göran Krampe <goran at krampe.se>:
> On 05/14/2010 10:08 AM, Hannes Hirzel wrote:
>>
>> On 5/14/10, Göran Krampe<goran at krampe.se>  wrote:
>>>
>>> Hi!
>>>
>>> So, one way to "screw it up" is to register a release with a URL that
>>> fails - say returns a 404. SM will then consider that result to be the
>>> correct result and compute an SHA hash and store the 404.html file as
>>> the cached "proper file". When the real file is placed on that URL it
>>> will not work since the SHA hash will be different and SM will instead
>>> rely on the cached file (which of course is a silly 404.html).
>>
>> This is the description of a bug. If an URL returns 404 and SqueakMap
>> still has a file cached it should not overwrite the cache version with
>> 404.html
>
> You did not read what I wrote (or I didn't describe it clear enough), I was
> describing a procedure where you *first* register a URL/release and only
> *afterwards* ensures that there is a file on that URL. That will not work.
>
> SM only updates the cache (AFAIK) if you:
>
>        1. Enter a new release.
>        2. Edit an existing release and *modify* its download URL.
>
> ...since the purpose of the cache is to actually *help* when a URL goes
> bad/offline etc, it would otherwise be quite pointless and indeed a major
> bug.
>
> regards, Göran
>
>



More information about the Squeak-dev mailing list