Commit 9fe1eeab authored by Volker Krause's avatar Volker Krause
Browse files

Cache OJP location query responses

parent 43cf51b6
......@@ -7,6 +7,7 @@
#include "openjourneyplannerbackend.h"
#include "openjourneyplannerparser.h"
#include "openjourneyplannerrequestbuilder.h"
#include "cache.h"
#include <KPublicTransport/Journey>
#include <KPublicTransport/JourneyReply>
......@@ -63,7 +64,7 @@ bool OpenJourneyPlannerBackend::queryLocation(const LocationRequest &request, Lo
if (p.hasError()) {
addError(reply, Reply::NotFoundError, p.errorMessage());
} else {
// TODO caching
Cache::addLocationCacheEntry(backendId(), reply->request().cacheKey(), locs, {});
addResult(reply, std::move(locs));
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment