<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://svn.reviewboard.kde.org/r/5528/">http://svn.reviewboard.kde.org/r/5528/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 7th, 2010, 2:53 p.m., <b>Frederik Gladhorn</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hi Matthias, thanks for looking into this issue. I have one main concern: the cache currently is per application, so what happens if you open two instances of the dialog for different apps? Don't they interfere with each other? The cache files end up in .kde/share/apps/knewstuff3/.</pre>
 </blockquote>




 <p>On October 7th, 2010, 3:02 p.m., <b>Frederik Gladhorn</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Sorry, I was clearly not reading properly, the hash takes care of that.</pre>
 </blockquote>





 <p>On October 7th, 2010, 3:08 p.m., <b>Christoph Feck</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Not that I really read the code, but the hash _is_ per application.</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hmmm, true, forgot that my stuff does not really share it, I just did not notice it at first since I tried it with two comic applets and there it worked, I suppose since the parent is one instance of plasma_desktop.

Do you know a feasible way to overcome this situation?</pre>
<br />








<p>- Matthias</p>


<br />
<p>On October 5th, 2010, 1:28 p.m., Matthias Fuchs wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for kdelibs and Frederik Gladhorn.</div>
<div>By Matthias Fuchs.</div>


<p style="color: grey;"><i>Updated 2010-10-05 13:28:23</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Shares the KNS3::Cache amongst every user, thus insuring that it is always consistent.
This way it can't happen, that e.g. KNS3::DownloadManager updates some KNS3::Entries and a call to KNS3::DownloadWidget later on would overwrite the updated ones as updateable.

Using shared pointers ensures that the cache is freed ones noone is using it anymore, resulting in less memory usage compared with a static cache.

NOTE: I am not sure if this is BC, though I think it is as KNS3::Cache is not exported, so please also look at this.

Bugs that could be related: 181730, 234265, 235680</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested it with two instances of the plasma applet comic, having a KNS3::DownloadDialog in both open at the same time.
Installing in one a new comic, while not doing this in the other.
This does not update the ui in the other, though this is not target of the patch. Yet since the cache is shared when saving the cache to the hd, both include the newly installed comic.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/KDE/kdelibs/knewstuff/knewstuff3/core/cache.h <span style="color: grey">(1182620)</span></li>

 <li>/trunk/KDE/kdelibs/knewstuff/knewstuff3/core/cache.cpp <span style="color: grey">(1182620)</span></li>

 <li>/trunk/KDE/kdelibs/knewstuff/knewstuff3/core/engine.h <span style="color: grey">(1182620)</span></li>

 <li>/trunk/KDE/kdelibs/knewstuff/knewstuff3/core/engine.cpp <span style="color: grey">(1182620)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/5528/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>