lib.cache: my new simple pure Scala solution for caching Options

(cross-post from scala-user)

Hello all,

Subj: http://dimgel.ru/lib.cache/

Simplest use case:

object ConfigDAL {
private val cache = new ValueCache[Config]
def data = cache {
// load Config instance from database and return
}
def data=(x: Config) {
// update database
cache.clear() // or optimized: cache.set(x)
}
}

I use it in web development to cache Squeryl query results, although
it does not depend on Squeryl or anything. Please check. If you think
it's worth publishing on scala-tools.org, please vote here:
http://groups.google.com/group/ru-dimgel-lib-cache/browse_thread/thread/...

Re: lib.cache: my new simple pure Scala solution for caching Opt

Damned copy-paster. Last word "Options" in subject was copied
occasionally.

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland