Cache

floodsim.view.util.resource.Cache
See theCache companion object
sealed trait Cache[K, A]

A generic cache for resources of type A indexed by keys of type K. This trait defines the core functionality for caching resources and retrieving them by key. Implementations determine how resources are stored and loaded.

Type parameters

A

the type of resources stored in the cache

K

the type of keys used to identify resources

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def get(key: K): LoadResult[A]

Retrieves a resource for the given key.

Retrieves a resource for the given key.

Value parameters

key

the key identifying the resource

Attributes

Returns

a LoadResult containing either the resource or an error