MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / SaveToCache

Method SaveToCache

Plugins/WebBrowser/Extension/FrmExtensionStore.cpp:674–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674int CFrmExtensionStore::SaveToCache(const QString &key, const QJsonObject &data)
675{
676 QString cachePath = GetCachePath() + "/" + key + ".json";
677
678 QJsonDocument doc(data);
679 QFile file(cachePath);
680
681 if(file.open(QIODevice::WriteOnly)) {
682 file.write(doc.toJson());
683 file.close();
684 qDebug(log) << "Cached:" << key;
685 return 0;
686 }
687
688 return -1;
689}
690
691QJsonObject CFrmExtensionStore::LoadFromCache(const QString &key) const
692{

Callers

nothing calls this directly

Calls 3

writeMethod · 0.80
openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected