Gnus development mailing list
 help / color / mirror / Atom feed
* should auth-source cache false results?
@ 2011-02-17 12:06 Ted Zlatanov
  2011-02-17 13:41 ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-02-17 12:06 UTC (permalink / raw)
  To: ding

It's pretty common that a search will return no results and :create is
nil, so we return nil from `auth-source-search'.  Do we want to cache
those cases?  Right now they are not cached.  It could be an option,
too, but you can argue both ways for the default.

Ted




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: should auth-source cache false results?
  2011-02-17 12:06 should auth-source cache false results? Ted Zlatanov
@ 2011-02-17 13:41 ` Ted Zlatanov
  2011-02-17 22:41   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-02-17 13:41 UTC (permalink / raw)
  To: ding

On Thu, 17 Feb 2011 06:06:16 -0600 Ted Zlatanov <tzz@lifelogs.com> wrote: 

TZ> It's pretty common that a search will return no results and :create is
TZ> nil, so we return nil from `auth-source-search'.  Do we want to cache
TZ> those cases?  Right now they are not cached.  It could be an option,
TZ> too, but you can argue both ways for the default.

Thinking about this, we should at least cache the absence of results if
the source file for the netrc backend has the same time as before.

Ted




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: should auth-source cache false results?
  2011-02-17 13:41 ` Ted Zlatanov
@ 2011-02-17 22:41   ` Lars Ingebrigtsen
  2011-02-22 20:53     ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-17 22:41 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Thinking about this, we should at least cache the absence of results if
> the source file for the netrc backend has the same time as before.

Sounds good to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: should auth-source cache false results?
  2011-02-17 22:41   ` Lars Ingebrigtsen
@ 2011-02-22 20:53     ` Ted Zlatanov
  2011-02-23  8:33       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-02-22 20:53 UTC (permalink / raw)
  To: ding

On Thu, 17 Feb 2011 14:41:38 -0800 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Thinking about this, we should at least cache the absence of results if
>> the source file for the netrc backend has the same time as before.

LI> Sounds good to me.

In practice this is, I think, a bad idea (I tried it out).  If the user
adds entries externally, he will be mystified and won't necessarily know
about auth-source-forget*.  So instead I cache all netrc searches now.

If you think there's a better way to do this, let me know.

Ted




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: should auth-source cache false results?
  2011-02-22 20:53     ` Ted Zlatanov
@ 2011-02-23  8:33       ` Lars Ingebrigtsen
  2011-02-23 15:07         ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-23  8:33 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> In practice this is, I think, a bad idea (I tried it out).  If the user
> adds entries externally, he will be mystified and won't necessarily know
> about auth-source-forget*.  So instead I cache all netrc searches now.

If the .authinfo file changes, then auth-source should forget those
entries automatically, shouldn't it?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: should auth-source cache false results?
  2011-02-23  8:33       ` Lars Ingebrigtsen
@ 2011-02-23 15:07         ` Ted Zlatanov
  2011-02-25  3:05           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-02-23 15:07 UTC (permalink / raw)
  To: ding

On Wed, 23 Feb 2011 00:33:31 -0800 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> In practice this is, I think, a bad idea (I tried it out).  If the user
>> adds entries externally, he will be mystified and won't necessarily know
>> about auth-source-forget*.  So instead I cache all netrc searches now.

LI> If the .authinfo file changes, then auth-source should forget those
LI> entries automatically, shouldn't it?

Yeah.  I must have screwed it up.  But now the other problem is that
false results and no results look the same, being nil.  How do I store
that semantic distinction?

Ted




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: should auth-source cache false results?
  2011-02-23 15:07         ` Ted Zlatanov
@ 2011-02-25  3:05           ` Lars Ingebrigtsen
  2011-02-25 21:32             ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-25  3:05 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Yeah.  I must have screwed it up.  But now the other problem is that
> false results and no results look the same, being nil.  How do I store
> that semantic distinction?

Hm...  is there a difference?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: should auth-source cache false results?
  2011-02-25  3:05           ` Lars Ingebrigtsen
@ 2011-02-25 21:32             ` Ted Zlatanov
  0 siblings, 0 replies; 8+ messages in thread
From: Ted Zlatanov @ 2011-02-25 21:32 UTC (permalink / raw)
  To: ding

On Thu, 24 Feb 2011 19:05:32 -0800 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Yeah.  I must have screwed it up.  But now the other problem is that
>> false results and no results look the same, being nil.  How do I store
>> that semantic distinction?

LI> Hm...  is there a difference?

With the brand spanking new `password-in-cache-p' I can distinguish
between a present key with a nil value and an absent key.  It's pushed
together with the auth-source.el changes to use it; please let me know
if you have problems.

Ted




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-25 21:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 12:06 should auth-source cache false results? Ted Zlatanov
2011-02-17 13:41 ` Ted Zlatanov
2011-02-17 22:41   ` Lars Ingebrigtsen
2011-02-22 20:53     ` Ted Zlatanov
2011-02-23  8:33       ` Lars Ingebrigtsen
2011-02-23 15:07         ` Ted Zlatanov
2011-02-25  3:05           ` Lars Ingebrigtsen
2011-02-25 21:32             ` Ted Zlatanov

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).