| 122 | } |
| 123 | |
| 124 | func (fn *ModuleFunction) cacheImplicitInputs() []dagql.ImplicitInput { |
| 125 | if fn == nil || fn.mod.Self() == nil || fn.metadata == nil { |
| 126 | return nil |
| 127 | } |
| 128 | |
| 129 | var implicitInputs []dagql.ImplicitInput |
| 130 | cachePolicy := fn.metadata.derivedCachePolicy(fn.mod.Self()) |
| 131 | switch cachePolicy { |
| 132 | case FunctionCachePolicyNever: |
| 133 | implicitInputs = append(implicitInputs, dagql.PerCallInput) |
| 134 | case FunctionCachePolicyPerSession: |
| 135 | implicitInputs = append(implicitInputs, dagql.PerSessionInput) |
| 136 | } |
| 137 | |
| 138 | return implicitInputs |
| 139 | } |
| 140 | |
| 141 | // setCallInputs sets the call inputs for the function call. |
| 142 | // |