pamelafox/lscache — pull request #20 by meconlin (2013-10-19 17:42:45+00:00)
Title: Use default time if none set, use 0 to set no timeout (just like memcached)

I added a default time to live of 5 minutes.

If a user wants no time to live then you can send a time value of 0 (this is how memcached does it).

If part of your application is not setting the optional time argument but another part of the application is then when the cache gets full only the items with times are considered for eviction. The result is you are not really evicting by recency, simply due to one dev leaving off an optional param and the other deciding to use it.

I believe having to explicitly set an item as forever ttl is better behavior (this is how memcached does it).

Tests added and all existing still pass.