Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty key in loadFromData #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nokeya
Copy link
Contributor

@nokeya nokeya commented Sep 23, 2020

In case we don't need to cache loaded animation. Check for key emptyness as added bonus.
It also can be achieved with cachePolicy=false, but it will require addtional to pass 4 arguments to method, instead if just one.

@dreampiggy
Copy link

dreampiggy commented Feb 20, 2021

LGTM... Any news ?

The C-API lottie_animation_from_data does not expose the cachePolicy param. So if I use C API, I can not disable it at all. See: https://github.com/Samsung/rlottie/blob/v0.2/inc/rlottie_capi.h#L77

So I think provide an empty key string is one workaround (which currently 0.2.0 does not have)

Due to the project configuration and language I use (Swift), I can not call any C++ API :(

@smohantty
Copy link
Contributor

@dreampiggy ,
If we expose the configureModelCacheSize() api in C that will solve your issue ?

@smohantty
Copy link
Contributor

@dreampiggy ,
have added a capi wrapper #467

@dreampiggy
Copy link

It's OK to add configureModelCacheSize.

Currently I disable the LOTTIE_MODEL_CACHE macro to totally disable the function. Because for my cases, I have one own cache for the this Animation instance level, so don't need another cache...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants