5 Replies Latest reply: Feb 7, 2013 7:51 AM by Blueberry Coder RSS

    Caching in ADF mobile

    sunil907
      Hi All,


      How to implement caching in ADF mobile application. We are using rest web service to get data inside the application.

      Please guide us.

      -sunil
        • 1. Re: Caching in ADF mobile
          user404
          Create a local database :
          http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/amxdatabase.htm
          • 2. Re: Caching in ADF mobile
            Blueberry Coder
            Hi.

            If you want or need caching, you will have to implement it yourself. There are no mechanisms to cache the results of web service calls automatically in ADF Mobile for the time being.

            What you need to do is to use the local SQLite database as a cache. Simply wrap you web service calls in a managed bean, and add the code to read/write to the database.

            Best Regards,

            Frédéric.
            • 3. Re: Caching in ADF mobile
              sunil907
              Thanks BlueBerry,

              I will try to go ahead with the solution what you have provided.

              Thanks a lot..

              Regards,
              Sunil
              • 4. Re: Caching in ADF mobile
                sunil907
                I have one more doubt. In ADF Mobile, Because of performance issue, i want to cache AMX pages also in ADF mobile. Means when user navigate back to the earlier requested page, it will show the data from cache. It will not execute the bean execute method (So no web service call).

                Regards,
                Sunil
                • 5. Re: Caching in ADF mobile
                  Blueberry Coder
                  You don't need to cache the page to achieve this, and the bean method must be called every time the page is executed. What you need is something like this:
                  if ( cache is empty || cache is invalid ){
                      call web wervice
                      store data in cache
                  }
                  else{
                      get data from cache
                  }
                  You need to ensure the entries in the cache are refreshed periodically in a way that meets your business requirements.

                  Best Regards,

                  Frédéric.