Subject: Re: bug#49033: 28.0.50; [PATCH] Feature suggestion, url-cache-expiry-alist to override expire time for cache pruning

From: Alex Bochannek <[email-masked]>
Date: Wed, 27 Oct 2021 09:36:44 -0700

Stefan,

Stefan Kangas <[email-masked]> writes:

> Alex Bochannek <[email-masked]> writes:
>
>> Lars Ingebrigtsen <[email-masked]> writes:
>>
>>> Alex Bochannek <[email-masked]> writes:
>>>
>>>> I originally had looked at this for Gravatar entries and I am now using
>>>> it to avoid fetching the same images in RSS feeds.
>>>
>>> Right; makes sense.
>>>
>>>> I just noticed though that `url-cache-create-url-from-file' won't work
>>>> if `url-cache-create-filename-human-readable' is used. Any suggestions
>>>> for how to address that?
>>>
>>> No, sorry -- I'm pretty unfamiliar with the url-cache code.
>>
>> I need to think about this some more. The easy way is to not try to
>> recreate the URL but to have users specify the path for cache entries. I
>> might just do that and see how that works out for me in practice. Either
>> way, it's not ready for merging yet.
>
> (That was 17 weeks ago.)
>
> Did you get any further here?  Thanks in advance.

I did not have a chance to work on this any further. The problem here is
that the way URLs are mapped to a directory structure does not allow for
a reliable backwards mapping. A thought I had about this was to keep an
intermediate mapping for URLs to cache files around in the cache
itself. Might be interesting to see how browsers solve this in general
as not to reinvent the wheel.

If this is something you would want to work on, please feel free to do
so! I don't think I will have uninterrupted time to focus on this until
the end of the year.

-- 
Alex.