1
0
Fork 0

check for empty collections list

This commit is contained in:
Jan Steemann 2015-08-20 20:25:01 +02:00
parent b785c44a5d
commit ffde050e0d
1 changed files with 2 additions and 1 deletions

View File

@ -148,7 +148,7 @@ void ClearQueryCache (TRI_transaction_t* trx) {
}
}
catch (...) {
// in case something goes wrong, we have to disable the query cache
// in case something goes wrong, we have to remove all queries from the cache
triagens::aql::QueryCache::instance()->invalidate(trx->_vocbase);
}
}
@ -1413,6 +1413,7 @@ int TRI_CommitTransaction (TRI_transaction_t* trx,
// if a write query, clear the query cache for the participating collections
if (trx->_type == TRI_TRANSACTION_WRITE &&
trx->_collections._length > 0 &&
triagens::aql::QueryCache::instance()->mayBeActive()) {
ClearQueryCache(trx);
}