# FunctionWithCaching class

Namespace: [Grasshopper2.Types.Functions](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.types.functions.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class FunctionWithCaching : Function
```

Useful abstract class for creating your own functions. This class extends the [Function](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function.md) abstract class by providing caching for derivative and indefinite integral functions. Note that it does *not* cache results for evaluations. If you want that level of caching, you must build it yourself.

**Derived types:** [BernsteinBasisFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.bernsteinbasisfunction.md), [BlendFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.blendfunction.md), [BlurFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.blurfunction.md), [BumpFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.bumpfunction.md), [ConicFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.conicfunction.md), [CumulativeDensityFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.cumulativedensityfunction.md), [CurveFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.curvefunction.md), [DecayFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.decayfunction.md), [DecayFunction.DecayDerivative](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.decayfunction.decayderivative.md), [ExpressionFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.expressionfunction.md), [FourierFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.fourierfunction.md), [FunctionA](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functiona.md), [FunctionF<T1>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionf-1.md), [GaussianFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.gaussianfunction.md), [GripGradient.GradientFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.colour.gripgradient.gradientfunction.md), [HyperbolaFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.hyperbolafunction.md), [InterpolationFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.interpolationfunction.md), [PolynomialFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.polynomialfunction.md), [ProbabilityDensityFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.probabilitydensityfunction.md), [ReciprocalFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.reciprocalfunction.md), [SequenceFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.sequencefunction.md), [SigmoidFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.sigmoidfunction.md), [SNoiseFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.snoisefunction.md), [SplineFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.splinefunction.md), [StudentTFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.studenttfunction.md), [ThresholdFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.thresholdfunction.md), [WaveletFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.standard.waveletfunction.md)

## Constructors

- [FunctionWithCaching](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/ctor.md): (2 overloads)

## Properties

- [Derivative](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/derivative.md): Gets a function which is the derivative of this function. The returned function may be either analytic or approximate.
- [Integral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/integral.md): Gets a function which is the indefinite integral of this function. The returned function may be analytic or approximate. Note that numeric approximation of indefinite integrals is a slow and not particularly high quality process.
- [Nomen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/nomen.md): Gets a description of this function.
- [Notation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/notation.md): Gets the notation for this function. Notation is aimed at humans and does not need to return a parseable string.

## Methods

- [EmitDerivative](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/emitderivative.md): Override this method to provide an analytic derivative.
- [EmitIntegral](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/emitintegral.md): Override this method to provide an analytic indefinite integral.
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.functionwithcaching/store.md)

## Inherited Members

- From [Function](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function.md): [Ui](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/ui.md), [Asymptotes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/asymptotes.md), [AutoCoDomain](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/autocodomain.md), [DomainEstimate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/domainestimate.md), [Holes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/holes.md), [Integrate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/integrate.md), [Poles](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/poles.md), [Y](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/y.md), [YYYY](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.functions.function/yyyy.md)
