cull_interval or cull_period would absolutely be the most accurate
description in terms of the algorithm's operation. My contention is that
parameter name would be confusing to all but those who have seen the actual
underlying culling algorithm; what if we convert to a random cache culler?.
All the user should have to worry about is, what fraction of cache do they
want to have culled. cull_fraction seems descriptive enough working with
some documentation clarification.

-Kurt

On Mon, Mar 30, 2009 at 12:19 PM, Ian Kelly <[email protected]> wrote:

>
> On Sun, Mar 29, 2009 at 2:12 PM, Kurt Grandis <[email protected]> wrote:
> > http://code.djangoproject.com/ticket/9986
> >
> >
> > This ticket proposes reconciling the code's parameter name,
> cull_frequency,
> > with the docs' cull_probability; the ticket proposes standardizing on
> > cull_probability, which I think would be misleading.
> >
> >
> > The code where cull_frequency actually does its magic shows that it is
> used
> > in frequency calculations:
> >
> > doomed = [os.path.join(self._dir, k) for (i, k) in enumerate(filelist) if
> i
> > % self._cull_frequency == 0]
> >
> > and
> >
> > doomed = [k for (i, k) in enumerate(self._cache) if i %
> self._cull_frequency
> > == 0]
> >
> > The default cull_frequency is 3, so the above code would flag every 3rd
> item
> > as doomed (1/f or 1/3). While cull_frequency is a more accurate
> description,
> > I don't think it is intuitive without seeing the underlying code.
> > cull_fraction might be a more appropriate and intuitive parameter name
> (e.g.
> > what fraction of the cache gets culled).
> >
> > cull_fraction?
>
> All of those are misleading, since they actually describe the
> reciprocal of the parameter.  As long as we're open to changing it, I
> suggest using cull_interval instead.
>
> Regards,
> Ian
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to