示例#1
0
void
lastfm::Track::invalidateGetInfo()
{
    // invalidate the track.getInfo cache
    QAbstractNetworkCache* cache = lastfm::nam()->cache();
    if ( cache )
    {
        QMap<QString, QString> map = params("getInfo", true);
        if (!lastfm::ws::Username.isEmpty()) map["username"] = lastfm::ws::Username;
        if (!lastfm::ws::SessionKey.isEmpty()) map["sk"] = lastfm::ws::SessionKey;
        cache->remove( lastfm::ws::url( map ) );
    }
}
示例#2
0
void QNetworkAccessHttpBackend::invalidateCache()
{
    QAbstractNetworkCache *nc = networkCache();
    if (nc)
        nc->remove(url());
}