Skip to content

Commit

Permalink
dont cache if "rand()" is contained in lowercased query
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbr committed Oct 17, 2024
1 parent 4ede216 commit c580953
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/qlever-petrimaps/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,8 @@ util::http::Answer Server::handleQueryReq(const Params& pars) const {

{
std::lock_guard<std::mutex> guard(_m);
if (_queryCache.count(queryId)) {
if (util::toLower(query).find("rand()") == std::string::npos &&
_queryCache.count(queryId)) {
sessionId = _queryCache[queryId];
reqor = _rs[sessionId];
} else {
Expand Down

0 comments on commit c580953

Please sign in to comment.