From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10817 invoked by alias); 13 Dec 2016 16:45:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40175 Received: (qmail 6758 invoked from network); 13 Dec 2016 16:45:28 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f54.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.213.54):SA:0(-0.0/5.0):. Processed in 1.724421 secs); 13 Dec 2016 16:45:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.54 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=bpM51ZgprWVwjQsH+I7wEXQXIrnfTIfFojpPtcX1cik=; b=bTAQYn6JzVk6w1lsQ2ae9WfxzXuvlxy+N0L459abpgM06fb88xLo1giQGxMIQ2rzyp jSu6JV09Ba4HSedZF0OqcnT2h032D3opjI5cIbGC4lVVSstakYQg1NooreAnA+wzH7HP JHIl2vl8DPFJFu6TQy+yJqgBg4BOYO42AY/5ZAmQcU/BX05GpbshvD5n+vKBJMlwRGZO Du1ZvYW5tT/kOHQbPwhtQHNrMYQELZIdZJ12wxkLZKCt6NnK0jtua5tOpRuYBqBpYgeB txSO2+38rVzgptniH7Nr3xIf+UsqzAwkbIRYwZXZHpu8qBDTNGGuQdArofqUuOD4PAUF kW8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=bpM51ZgprWVwjQsH+I7wEXQXIrnfTIfFojpPtcX1cik=; b=QHyaQ0b0CqQcIxUspCgbULg/3jogeqaRU448ftgePr8FOnSfOXdSRQFyte49JbIyy+ yEY4uJHbUFW+2/a6qqf9RgYxtRxoSPP6whup9/aH0L90vYPtnxrEGZ82fChYBF92u4c6 0nR28nBlML2mftfbX8+onTh8aybbylflcJvKpdFSj+8YKGGwOG7NXTFf2Yny0OPOpNUD pE6QPobKkLI2WK9FeTH9cjOID43e7UJ2AKRbSLnv2LL3zg8ql9o+cgQEnl6g1/StRnLA 9hHjmWx6Fpwp1FtsCoAqqdQtEj9RerO/0EgBWAPCQpeeZ8xfHfl/AK5NA2h3V+OwfDw8 BSkQ== X-Gm-Message-State: AKaTC00Osfk3tvyR/e4SpajPzQnirQPZUykME4PK1jcinpOO/Qdk56rXtz8R6jaU1T/wVg== X-Received: by 10.159.39.230 with SMTP id b93mr82091107uab.87.1481647096595; Tue, 13 Dec 2016 08:38:16 -0800 (PST) From: Bart Schaefer Message-Id: <161213083842.ZM21919@torch.brasslantern.com> Date: Tue, 13 Dec 2016 08:38:42 -0800 In-Reply-To: <6472.1481623850@hydra.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: caching mechanism and Re: PATCH Completion for _yum" (Dec 13, 11:10am) References: <61b3fb7c-4de6-d8da-29b4-b3802d98b162@mathphys.fsk.uni-heidelberg.de> <20161027013054.GA15799@fujitsu.shahaf.local2> <484fa75d-9361-df92-06b4-54fad37231f4@mathphys.fsk.uni-heidelberg.de> <98208.1478792966@hydra.kiddle.eu> <765413af-36a5-9afb-dd8a-7e1a39d05dde@mathphys.fsk.uni-heidelberg.de> <31607.1478915523@hydra.kiddle.eu> <75905.1479841546@hydra.kiddle.eu> <6472.1481623850@hydra.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh workers Subject: Re: caching mechanism and Re: PATCH Completion for _yum MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 13, 11:10am, Oliver Kiddle wrote: } } I'm also not keen on the functions setting a zstyle for the } default cache policy. Couldn't the default just be a parameter } to _cache_invalid? Some of the style lookups eschewed $curcontext so it } is not making it easier to use right. Using $curcontext would end up meaning that there are different copies of the cache for different paths into the completion. That's probably not what's intended. } The naming convention for these policy functions also doesn't help } people to get the sense of the return status right. How about something } like _finkpkgs_cache_stale instead of _finkpkgs_caching_policy? To be honest I've always thought that the design of the caching system was unnecessarily convoluted. It's trying to be object-oriented and template-like and probably mirrors something that was originally done in another language in another context. (Adam isn't still hanging around here, is he?) (This is somewhat ironic considering that the patch which proposed the cache says "I think you'll agree the interface is very simple." Two rounds of discussion with Sven W. later, ...) It was also probably not the best idea to put the caching functions in the doc in alphabetical order (or else they should have all been named with _cache at the start instead of at the end); they should have been in their own section with some explanation of the gestalt.