Actually, the code I posted might behave less well if the timing is less
uniform. It's better to store wait times with queue entries rather than with
cache entries:
(defn my-memoize
"Returns a memoized version of a referentially transparent
function. The memoized version of the function keeps
On Fri, Oct 30, 2009 at 7:57 PM, Stefan Arentz wrote:
> This is some of my first Clojure code so it might not be the
> greatest ... yet!
>
It's quite interesting.
(defn my-memoize
> "Returns a memoized version of a referentially transparent
> function. The
> memoized version of the function
This is some of my first Clojure code so it might not be the
greatest ... yet!
Here is an improved memoize function that also takes a time-to-live
argument. Useful when you want to expire results from the cache.
I'm using it to cache query results from a database. This probably
breaks som