On Fri, May 21, 2010 at 2:04 PM, Benjamin Meyer <[email protected]> wrote:
> Do you plan on putting your db cache implementation up online? I would be > interested in checking it out (I wrote the simple disk one in Qt). Have you > written benchmarks yet? > > In my case, speed is not that important. But having a centralized place for cache is more imp. We are running webkit on multiple computers and having a central place to cache the cookies, jss, css is useful as different webkit instances running on different computers can share this cache. Further, instead of using db, I am putting these things in memcache ( we already have couple of memcache servers running so it made more sense to put them there). Regarding putting the implementation online, right now I don't have the bandwidth to contribute the code back to open source and maintain it, but I will be happy to help anyone with code snippets etc. -Tarandeep > -Benjamin Meyer > > On May 21, 2010, at 1:15 PM, [email protected] wrote: > > > Tarandeep, Benjamin, > > > > You can reduce your client's chattiness with the server if you also set > the QNetworkRequest::PreferCache flag on outbound HTTP requests: > > > > request2.setAttribute(QNetworkRequest::CacheLoadControlAttribute, > QNetworkRequest::PreferCache); > > > > The default is PreferNetwork, which means that even though the content > was originally sent with an "expires" head, the cache will still check with > the server if it has a newer copy. This is bad for performance, but good for > correctness. > > > > http://doc.trolltech.com/4.6/qnetworkrequest.html#CacheLoadControl-enum > > > > http://doc.trolltech.com/4.6/qnetworkdiskcache.html#details > > > > > > Siddharth > > > >> -----Original Message----- > >> From: [email protected] [mailto:webkit-qt- > >> [email protected]] On Behalf Of ext Benjamin Meyer > >> Sent: Thursday, May 20, 2010 12:03 AM > >> To: Tarandeep Singh > >> Cc: [email protected] > >> Subject: Re: [webkit-qt] Implementing my cache- control flow > >> > >> All of the html caching is done outside of webkit and in the QNetwork > >> classes. Referring to the docs for the QNetworkCache interface is best. > >> What you have it about correct, often times even if the cache is ok it > >> will update headers if I remember. > >> > >> -Benjamin Meyer > >> > >> > >> On Apr 13, 2010, at 2:25 PM, Tarandeep Singh wrote: > >> > >>> Hi, > >>> > >>> I am trying to implement a Database cache for webkit for my project. > >> Can > >>> someone please confirm if this control flow is correct- > >>> > >>> 1) For a given url, webkit will get its metadata by calling the > >> function > >>> QNetworkCacheMetaData metaData( Url) > >>> > >>> 2) webkit will check the last modified date, expiration date stored in > >> the > >>> metadata and if these dates are fine (compared to the actual dates > >> found on > >>> the site) then it will get the data by calling the function- > >>> QIODevice * data( Url) > >>> > >>> 3) else it will get the file from network and then store in cache by > >> first > >>> calling prepare( ) and then insert( ) > >>> > >>> -Tarandeep > >>> _______________________________________________ > >>> webkit-qt mailing list > >>> [email protected] > >>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt > >> > >> _______________________________________________ > >> webkit-qt mailing list > >> [email protected] > >> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt > >
_______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
