CachedFactory

mill.util.CachedFactory
abstract class CachedFactory[K, V] extends CachedFactoryWithInitData[K, Unit, V]

As CachedFactoryWithInitData but does not have an initialization data.

Attributes

Source
CachedFactory.scala
Graph
Supertypes
class CachedFactoryWithInitData[K, Unit, V]
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def setup(key: K): V

Attributes

Source
CachedFactory.scala

Concrete methods

final def setup(key: K, initData: Unit): V

Attributes

Source
CachedFactory.scala
def withValue[R](key: K)(block: V => R): R

Attributes

Source
CachedFactory.scala

Inherited methods

def cacheEntryStillValid(key: K, initData: => Unit, value: V): Boolean

Returns true if the cache entry associated with the given key is still valid, false otherwise.

Returns true if the cache entry associated with the given key is still valid, false otherwise.

If false, the entry will be removed from the cache and setup will be invoked.

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
def close(): Unit

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
def withValue[R](key: K, initData: => Unit)(block: V => R): R

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala

Inherited and Abstract methods

def maxCacheSize: Int

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
def teardown(key: K, value: V): Unit

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala