Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25663

Android. HttpClient.cache. ImageView.cache


    • Sprint:
      2018 Sprint 04 SDK


      In iOS Titanium.Network.HttpClient has cache property, which allow to store http responses in locally on device, Ti SDK for Android lack this property. But remote images loaded by ImageView are stored in cache and there is no way to disable it.

      I have implemented HttpResponseCache module for Android (simple binding to android.net.http.HttpResponseCache), also I've added cache properties to HttpClient and ImageView.
      So attached pathes intoduces this features:

      • conditional caching for HttpClient responses and for remote images loaded by ImageView
      • configurable http-response cache storage with some statistics

      In patches Ti.Android.HttpResponseCache is not installed (enabled) on application start and should be installed manually by calling "install" method. Without enabled Ti.Android.HttpResponseCache "HttpClient.cache = true" will work with TiResponseCache, but "ImageView.cache = false" will not work, because images cached by TiResponseCache anyway.

      I think, if you'll find this changes usefull, TiResponseCache class could be totally removed because, as I understand correctly, TiResponseCache was created when HttpResponseCache wasn't exists and stays for now as legacy.


          Issue Links



              • Assignee:
                vijaysingh Vijay Singh
                s.volkov Sergey Volkov
                Gary Mathews
              • Watchers:
                6 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration