diff --git a/tgs.go b/tgs.go index f3f2529..6002359 100644 --- a/tgs.go +++ b/tgs.go @@ -13,6 +13,7 @@ type TGSTransformOptions struct { Qualtity int ResizeWidth int ResizeHeight int + CacheKey string } type TGSConverter interface { diff --git a/tgs/service.go b/tgs/service.go index d025ba1..d89e788 100644 --- a/tgs/service.go +++ b/tgs/service.go @@ -38,7 +38,7 @@ func (t tgsConverterImpl) Transform(ctx context.Context, in io.Reader, out io.Wr return err } - anim := rlottie.LottieAnimationFromData(buf.String(), "", "") + anim := rlottie.LottieAnimationFromData(buf.String(), opts.CacheKey, "") defer rlottie.LottieAnimationDestroy(anim) width, height := rlottie.LottieAnimationGetSize(anim)