On Mon, Mar 30, 2009 at 1:25 PM, Kurt Grandis <[email protected]> wrote: > 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.
I ran into this same problem when trying to document cull_frequency in Pro Django. I ended up adding a separate paragraph to explain the actual behavior, so readers could better understand what value to supply. I've brought it up in the past on IRC, and there seemed to be some agreement that it wasn't optimal, but no better alternatives were found at the time. Personally, I'd rather see an argument name that tries to tell users what to supply, rather than solely trying to be true to the algorithm. Obviously, the goals should coincide, but focusing on the supplied value brings another option to my mind: cull_passes (or something similar, like cull_sweeps). Essentially document it as being the number of times the cull operation would need to be performed to completely empty the cache. That way, we could describe what the cull operation actually does, rather than how it works. If you want it to cull a lot, set it to a low number so that fewer passes are required to clear the whole thing. Setting it to a higher number would require more passes to do the same job. Does that make sense to anyone else? Of course, I realize that now is quite the worst time to suggest a change, so I'm not suggesting it be changed now. Changing the name doesn't fix any bugs in the behavior, nor is it backward-compatible, so it's well out of scope for 1.1, and possibly the rest of the 1.x line, but I'll leave that decision up to those who are responsible for such matters. I'll also warn that this type of thing easily spins into a bikeshed thread, so don't be surprised (or upset) if somebody comes along and shuts it down to focus our efforts on more pressing matters. -Gul --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
