Check out http://kotka.de/blog/2010/03/The_Rule_of_Three.html for a very
flexible implementation of memoiz

On Sep 18, 2010 1:40 PM, "Sean Corfield" <seancorfi...@gmail.com> wrote:

Working in the web dev world, I'm fairly used to systems offering ways
to cache data for a period of time to improve performance - to reduce
database traffic, to reduce complex data manipulation. The pattern is
pretty much always:

if ( thing not in cache ) {
   do expensive calculation / data loading
   put thing in cache for X minutes
}
get thing from cache (and return it or do something to it)

Since memoize seems to be 'forever' and caching in general smells of
mutable state, I wondered how folks are tackling this sort of thing in
Clojure? Are you simply dropping down to Java libraries and being
'non-functional' or is there some more idiomatic approach available?
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to