Step

dfhdl.internals.DiskCache.Step
abstract class Step[F, R](prevStepOrValue: Step[_, F] | (() => F), val hasGenFiles: Boolean)(otherDeps: => Any*) extends HasTypeName

A Step represents a cacheable computation step in a processing pipeline.

Each Step takes an input of type F, produces an output of type R, and caches the result based on a provided key. Steps can be chained together to form a pipeline where each step's output becomes the input to the next step.

Type parameters

F

The input type for this step

R

The output type for this step

Value parameters

otherDeps

Additional dependencies for this step. These are used to determine if the cached result is still valid. To implement a Step, you must define:

  • run: The actual computation that transforms F to R
  • valueToCacheStr: How to serialize the result to a string for caching
  • cacheStrToValue: How to deserialize the cached string back to the result type Optionally, you can override:
  • logCachedRun: Custom logging when a cached result is used
  • name: The name used for cache files (defaults to the class name)
prevStepOrValue

Either a previous Step that produces this step's input, or a function that provides the input

Attributes

Graph
Supertypes
trait HasTypeName
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

final def apply(uncached: Boolean): R

Concrete fields

val hasGenFiles: Boolean

Inherited fields

lazy val typeName: String

Attributes

Inherited from:
HasTypeName