On Mon, Mar 30, 2009 at 2:22 PM, Marty Alchin <[email protected]> wrote:
> 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?

The only thing that bothers me about this approach is that running the
cull operation multiple times in a row wouldn't actually do that.  If
you set the parameter to 2, and you run it twice, the first sweep
would cull half the entries, and the second sweep would cull half the
remaining entries, leaving 1/4 of the original entries in the cache.
But since culling multiple times in a row isn't a real use case, it
probably doesn't matter.

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