CacheAndReplace
@deprecated("Use StrFnCache instead.", "1.1.0")
Takes a potentially slow String* => String
function and makes it super fast by executing it once,
optimising and caching the result, and then using it as template for all subsequent calls.
This assumes provided functions are pure (e.g. embedding the current time would be a violation).
This assumes provided functions treat their inputs as opaque values (e.g. inspecting an argument representing a username to provide "john" a different result than "mary" is a violation.)
Note: If you call compileN with a function that returns an japgolly.scalagraal.Expr and see an error about an implicit Functor not found, add this import:
import cats.instances.either._
- Deprecated
Type members
Value members
Inherited methods
def compile12[A, B, C, D, E, F, G, H, I, J, K, L](f: (A, B, C, D, E, F, G, H, I, J, K, L) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L]): (A, B, C, D, E, F, G, H, I, J, K, L) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile13[A, B, C, D, E, F, G, H, I, J, K, L, M](f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M]): (A, B, C, D, E, F, G, H, I, J, K, L, M) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile14[A, B, C, D, E, F, G, H, I, J, K, L, M, N](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile15[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile16[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile17[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile18[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile19[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S], T: Param[T]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S], T: Param[T], U: Param[U]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compile22[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => String)(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S], T: Param[T], U: Param[U], V: Param[V]): (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => String
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF11[Z[_], A, B, C, D, E, F, G, H, I, J, K](f: (A, B, C, D, E, F, G, H, I, J, K) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF12[Z[_], A, B, C, D, E, F, G, H, I, J, K, L](f: (A, B, C, D, E, F, G, H, I, J, K, L) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF13[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M](f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF14[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF15[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF16[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF17[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF18[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF19[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF20[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S], T: Param[T], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF21[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S], T: Param[T], U: Param[U], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => String]
- Inherited from:
- CacheAndReplaceBoilerplate
def compileF22[Z[_], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => Z[String])(implicit A: Param[A], B: Param[B], C: Param[C], D: Param[D], E: Param[E], F: Param[F], G: Param[G], H: Param[H], I: Param[I], J: Param[J], K: Param[K], L: Param[L], M: Param[M], N: Param[N], O: Param[O], P: Param[P], Q: Param[Q], R: Param[R], S: Param[S], T: Param[T], U: Param[U], V: Param[V], Z: Functor[Z]): Z[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => String]
- Inherited from:
- CacheAndReplaceBoilerplate