2010-06-14 04:59:29 +02:00
|
|
|
/* sbt -- Simple Build Tool
|
|
|
|
|
* Copyright 2009 Mark Harrah
|
|
|
|
|
*/
|
|
|
|
|
package sbt
|
2009-08-16 20:29:08 +02:00
|
|
|
|
|
|
|
|
import java.io.{InputStream,OutputStream}
|
|
|
|
|
|
|
|
|
|
class NoInputCache[T] extends InputCache[T]
|
|
|
|
|
{
|
|
|
|
|
def uptodate(in: T)(cacheStream: InputStream) =
|
|
|
|
|
new CacheResult
|
|
|
|
|
{
|
|
|
|
|
def uptodate = true
|
|
|
|
|
def update(outputStream: OutputStream) {}
|
|
|
|
|
}
|
|
|
|
|
def force(in: T)(outputStream: OutputStream) {}
|
|
|
|
|
}
|
|
|
|
|
class NoOutputCache[O](create: => O) extends OutputCache[O]
|
|
|
|
|
{
|
|
|
|
|
def loadCached(cacheStream: InputStream) = create
|
|
|
|
|
def update(out: O)(cacheStream: OutputStream) {}
|
|
|
|
|
}
|