zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: caching mechanism and Re: PATCH Completion for _yum
Date: Tue, 13 Dec 2016 08:38:42 -0800	[thread overview]
Message-ID: <161213083842.ZM21919@torch.brasslantern.com> (raw)
In-Reply-To: <6472.1481623850@hydra.kiddle.eu>

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.


      parent reply	other threads:[~2016-12-13 16:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 17:37 PATCH Completion for _yum (contains FIXMEs) Paul Seyfert
2016-10-27  1:30 ` Daniel Shahaf
2016-10-31 12:09   ` Paul Seyfert
2016-11-10 10:18     ` Paul Seyfert
2016-11-10 15:49       ` Oliver Kiddle
2016-11-12  0:19         ` PATCH Completion for _yum Paul Seyfert
     [not found]           ` <31607.1478915523@hydra.kiddle.eu>
2016-11-22 19:05             ` caching mechanism and " Oliver Kiddle
2016-12-13 10:10               ` Oliver Kiddle
2016-12-13 16:18                 ` Jun T.
2016-12-13 17:21                   ` Bart Schaefer
2016-12-14 11:38                     ` Oliver Kiddle
2016-12-14 14:23                       ` Jun T.
2016-12-14 15:03                         ` Oliver Kiddle
2016-12-14 15:23                           ` Jun T.
2016-12-14 17:46                             ` Oliver Kiddle
2016-12-14 20:09                               ` Bart Schaefer
2016-12-15  9:38                               ` Peter Stephenson
2016-12-15 17:15                                 ` Before 5.3.1 (was Re: caching mechanism and Re: PATCH Completion for _yum) Bart Schaefer
2016-12-13 16:38                 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161213083842.ZM21919@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).