kraih/mojo — pull request #355 by niczero (2012-07-18 12:29:18+00:00)
Title: Improved handling of mulitple ->set in Mojo::Cache

In the main version, if the same key is set multiple times, each time consumes a slot in the space-bounded queue, lessening the value of the cache and hastening the unnecessary removal of entries.
While fixing that, I removed two sources of confusion: the queue is no longer called 'stack' and the while-loop is replaced by a simple conditional.
But the bit you'll like: it now has (1) fewer lines of code while retaining the same functionality and passing all tests.
Nic