From e6687774318b9de954f634db1fd302ee3a141c65 Mon Sep 17 00:00:00 2001 From: eugene Date: Sun, 14 Sep 2025 22:39:50 +0300 Subject: [PATCH] add cachekey --- tgs.go | 1 + tgs/service.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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)