<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cache files properly with Core API for iOS and Swift in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cache-files-properly-with-Core-API-for-iOS-and-Swift/m-p/182090#M7525</link>
    <description>&lt;P&gt;The&amp;nbsp;Dropbox API and SDK themselves don't offer local caching like this, so you will need to implement it in your app's code if your app needs caching. Actual&amp;nbsp;caching strategies and algorithms are beyond the scope of just Dropbox/Dropbox API support, so I can't offer much help with that in general. Perhaps someone here can offer some advice or direct you to some good resources though.&lt;/P&gt;
&lt;P&gt;One thing I will note specific to&amp;nbsp;Dropbox though, is to check the rev for the value. The remote&amp;nbsp;Dropbox file could have changed after you originally downloaded it, meaning the copy you have locally is out of date.&lt;/P&gt;</description>
    <pubDate>Tue, 10 May 2016 01:44:35 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-05-10T01:44:35Z</dc:date>
    <item>
      <title>Cache files properly with Core API for iOS and Swift</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cache-files-properly-with-Core-API-for-iOS-and-Swift/m-p/182089#M7524</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I'm now working on the simple Dropbox viewer application.&lt;BR /&gt;Currently I'm using "download to Documents folder" method like that:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;if&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;let&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; data =&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;NSData&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(contentsOfFile: destinationPath) {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s4"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;print&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"File already cached"&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;else&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="s4"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;print&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"File not cached, processing cache operation..."&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;Manager&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;.client.&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;loadFile&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;filePath&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;, intoPath: destinationPath)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;Files are downloading properly, but, I think, that it's a wrong way to cache files.&amp;nbsp;&lt;BR /&gt;So, the question is: is there a way to cache images with standard API tools&amp;nbsp;and, for example, store them with NSCache or something similar?&lt;BR /&gt;&lt;BR /&gt;P.S. It's not essentially important, actually,&amp;nbsp;in which programming language will be answer, I'm simply trying to understand the principles, if they exist&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:33:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cache-files-properly-with-Core-API-for-iOS-and-Swift/m-p/182089#M7524</guid>
      <dc:creator>vanya e.</dc:creator>
      <dc:date>2019-05-29T09:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cache files properly with Core API for iOS and Swift</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cache-files-properly-with-Core-API-for-iOS-and-Swift/m-p/182090#M7525</link>
      <description>&lt;P&gt;The&amp;nbsp;Dropbox API and SDK themselves don't offer local caching like this, so you will need to implement it in your app's code if your app needs caching. Actual&amp;nbsp;caching strategies and algorithms are beyond the scope of just Dropbox/Dropbox API support, so I can't offer much help with that in general. Perhaps someone here can offer some advice or direct you to some good resources though.&lt;/P&gt;
&lt;P&gt;One thing I will note specific to&amp;nbsp;Dropbox though, is to check the rev for the value. The remote&amp;nbsp;Dropbox file could have changed after you originally downloaded it, meaning the copy you have locally is out of date.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 01:44:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cache-files-properly-with-Core-API-for-iOS-and-Swift/m-p/182090#M7525</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-05-10T01:44:35Z</dc:date>
    </item>
  </channel>
</rss>

