From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs Subject: bug#49033: 28.0.50; [PATCH] Feature suggestion, url-cache-expiry-alist to override expire time for cache pruning Date: Wed, 27 Oct 2021 09:36:44 -0700 Message-ID: References: <87r1h3tdys.fsf@gnus.org> <877diq2gqw.fsf@gnus.org> <87lf73tnl4.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17288"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: Lars Ingebrigtsen , 49033@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 27 19:47:18 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfn19-0004DY-Pj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Oct 2021 19:47:15 +0200 Original-Received: from localhost ([::1]:57230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfn18-0004P2-Hm for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Oct 2021 13:47:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mflvC-0005oo-8n for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 12:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mflvB-0005KQ-TJ for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 12:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mflvB-0005Fn-II for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2021 12:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Oct 2021 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49033 X-GNU-PR-Package: emacs Original-Received: via spool by 49033-submit@debbugs.gnu.org id=B49033.163535261120171 (code B ref 49033); Wed, 27 Oct 2021 16:37:01 +0000 Original-Received: (at 49033) by debbugs.gnu.org; 27 Oct 2021 16:36:51 +0000 Original-Received: from localhost ([127.0.0.1]:50424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mflv1-0005FH-Es for submit@debbugs.gnu.org; Wed, 27 Oct 2021 12:36:51 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:30253 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfluy-0005F7-Jw for 49033@debbugs.gnu.org; Wed, 27 Oct 2021 12:36:51 -0400 Original-Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:bdaa:4657:4c0c:4518]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4HfZ8Y3KPJz3pf6L; Wed, 27 Oct 2021 09:36:45 -0700 (PDT) In-Reply-To: (Stefan Kangas's message of "Sun, 24 Oct 2021 00:27:16 -0700") Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218463 Archived-At: Stefan, Stefan Kangas writes: > Alex Bochannek writes: > >> Lars Ingebrigtsen writes: >> >>> Alex Bochannek 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.