Skip to main content
SDK Caching

How to control SDK caching?

Tanya Moroz avatar
Written by Tanya Moroz
Updated over a week ago

Appodeal uses autocaching ads by default. This means after SDK initialization ads will be loaded automatically and displayed when Appodeal.show method is called. And then ad caching starts again while displaying. 

In some cases, e.g. improve display rate or decrease SDK loads when several ad types are cached, you can use manual caching.

To use manual caching, you need to disable autocaching before SDK initialization: 

Appodeal.setAutoCache(adTypes, false);

*This is an Android example, see the docs for other platforms

Then right before the ad display (several seconds in advance) call 

Appodeal.cache((Activity)this, adTypes);

Please note that before display ad needs some time (5-15 sec) to get loaded, so you should call the cache method in advance. 

We don’t recommend using manual caching for banners, because it’s an auto-updated ad type and it should be loaded at least every 15 seconds, so it may be harder to implement manual caching correctly — you will need to add an extra logic for banners. Autocache works optimal for banners.

If you have any questions about implementing manual caching, please write to [email protected].

Did this answer your question?