<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GStreamer] Store preloaded media in webkit's cache"
   href="https://bugs.webkit.org/show_bug.cgi?id=119477#c14">Comment # 14</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GStreamer] Store preloaded media in webkit's cache"
   href="https://bugs.webkit.org/show_bug.cgi?id=119477">bug 119477</a>
              from <span class="vcard"><a class="email" href="mailto:eocanha&#64;igalia.com" title="Enrique Ocaña &lt;eocanha&#64;igalia.com&gt;"> <span class="fn">Enrique Ocaña</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=119477#c5">comment #5</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=119477#c4">comment #4</a>)
&gt; &gt; It can be used between sessions if webkit gives an appropriate name to the
&gt; &gt; files IIRC. But yes, it should probably go into g_get_tmp_dir(). Main
&gt; &gt; problem with that is that some people put /tmp on a tmpfs... so if you want
&gt; &gt; to watch a long enough movie, your memory runs full.
&gt; 
&gt; /tmp on tmpfs has been default in Fedora for several years now... I was
&gt; amazed quite recently to learn that other distros are still not doing this.
&gt; Anyway, the videos would have to go in /var/tmp since they are big. But
&gt; /var/tmp is not cleaned automatically, so there needs to be some measure to
&gt; clean up leaked videos in the event of a web process crash.</span >

A naive suggestion would be to treat /var/tmp as system storing /tmp on disk treat it. Those systems clean /tmp on boot. My suggestion is to use /var/tmp/${USER}/WebKit-media (or some better name) as &quot;tmp&quot;, and not cleaning it at webprocess' death (which can be uncontrolled in the very worst case), but at WebKit start. Each time WebKit starts, it cleans the previous &quot;tmp&quot;.

More efficient approaches can be implemented on top of that, but I think this one could be fine as a baseline.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>